diff options
author | George Fraser <george@fivetran.com> | 2019-01-04 21:52:17 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2019-01-04 21:52:17 -0800 |
commit | 5dd9d7d4f50bdc1f3791b8f1f4a65a8893bca722 (patch) | |
tree | 0ae8f071f54c8324575308b3995eab9b920abaf5 /src/test/test-project | |
parent | 5bee8166de838a82baa18ef9449f5d2814d5a625 (diff) | |
download | java-language-server-5dd9d7d4f50bdc1f3791b8f1f4a65a8893bca722.zip |
Java can reference a symbol without importing it
Diffstat (limited to 'src/test/test-project')
3 files changed, 23 insertions, 0 deletions
diff --git a/src/test/test-project/workspace/src/org/javacs/example/ReferenceIndirectImport.java b/src/test/test-project/workspace/src/org/javacs/example/ReferenceIndirectImport.java new file mode 100644 index 0000000..43a957c --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/example/ReferenceIndirectImport.java @@ -0,0 +1,11 @@ +package org.javacs.example; + +import org.javacs.other.ImportDirectly; + +class ReferenceIndirectImport { + void test() { + var direct = new ImportDirectly(); + var indirect = direct.getImportIndirectly(); + indirect.memberOfIndirectImport(); + } +}
\ No newline at end of file diff --git a/src/test/test-project/workspace/src/org/javacs/other/ImportDirectly.java b/src/test/test-project/workspace/src/org/javacs/other/ImportDirectly.java new file mode 100644 index 0000000..aef2d73 --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/other/ImportDirectly.java @@ -0,0 +1,7 @@ +package org.javacs.other; + +public class ImportDirectly { + public ImportIndirectly getImportIndirectly() { + return new ImportIndirectly(); + } +}
\ No newline at end of file diff --git a/src/test/test-project/workspace/src/org/javacs/other/ImportIndirectly.java b/src/test/test-project/workspace/src/org/javacs/other/ImportIndirectly.java new file mode 100644 index 0000000..50fefed --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/other/ImportIndirectly.java @@ -0,0 +1,5 @@ +package org.javacs.other; + +public class ImportIndirectly { + public void memberOfIndirectImport() { } +}
\ No newline at end of file |