-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Include static imports of nested types in AST (#5213)
Co-authored-by: sonatype-lift[bot] <37194012+sonatype-lift[bot]@users.noreply.github.com> Co-authored-by: I-Al-Istannen <[email protected]>
- Loading branch information
1 parent
afa5f57
commit b645b94
Showing
7 changed files
with
105 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package inner_class; | ||
|
||
import java.util.List; | ||
import static inner_class.constants.Constants.InnerClass; | ||
|
||
public class Main { | ||
public void fun() { | ||
List list = List.of(1, 2, 3); | ||
InnerClass innerClass = new InnerClass(); | ||
innerClass.print(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package inner_class.constants; | ||
|
||
public class Constants { | ||
public static int ZERO = 0; | ||
|
||
public static class InnerClass { | ||
public void print() { | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package static_method_and_type; | ||
|
||
import static static_method_and_type.imports_are_here.Bar.foo; | ||
|
||
public class Main { | ||
public void fun() { | ||
foo(); | ||
} | ||
|
||
static class another_bar extends foo { } | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
src/test/resources/static-method-and-type/imports-are-here/Bar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package static_method_and_type.imports_are_here; | ||
|
||
public class Bar { | ||
public static void foo() {} | ||
public static class foo {} | ||
} |