Skip to content

Commit

Permalink
Consider Java constructors as spaces of type function
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ballario authored and Luni-4 committed May 10, 2022
1 parent f3b5dc1 commit 6039c8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Checker for JavaCode {
mk_checker!(is_comment, Comment);
mk_checker!(is_string, StringLiteral);
mk_checker!(is_call, MethodInvocation);
mk_checker!(is_func, MethodDeclaration);
mk_checker!(is_func, MethodDeclaration, ConstructorDeclaration);
mk_checker!(is_closure, LambdaExpression);
mk_checker!(
is_func_space,
Expand Down
2 changes: 1 addition & 1 deletion src/getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl Getter for JavaCode {
let typ = node.object().kind_id();
match typ.into() {
ClassDeclaration => SpaceKind::Class,
MethodDeclaration | LambdaExpression => SpaceKind::Function,
MethodDeclaration | ConstructorDeclaration | LambdaExpression => SpaceKind::Function,
InterfaceDeclaration => SpaceKind::Interface,
Program => SpaceKind::Unit,
_ => SpaceKind::Unknown,
Expand Down

0 comments on commit 6039c8a

Please sign in to comment.