[AA] Refactoring: Move Java reference resolve tests to java subfolder

This commit is contained in:
Marco Pennekamp
2023-12-19 14:26:15 +01:00
committed by Space Team
parent 5d3738c804
commit c611f1923f
25 changed files with 310 additions and 240 deletions
@@ -0,0 +1,20 @@
// FILE: pkg/Foo.java
package pkg;
public class Foo {
public static void bar() {
System.out.println("Foo.bar()");
}
}
// FILE: main.kt
import pkg.Foo
fun box() {
// NB: if we put bar<caret>(), LPAR, value arguments, function call, containing function and file will be visited in order.
// Among them, only function call can be converted to [KtReference], and the corresponding form is [KtInvokeFunctionReference],
// whose resolution picks implicit invoke() only, hence failed. That is expected for reference resolution with both FE1.0 and FIR.
// In reality, i.e., in IDE, users will click the part of function call "name", which results in simple name reference instead.
Foo.ba<caret>r()
}