K2 IC: add lookups of candidates on tower level processing

Allow recording lookup to symbols from supertypes, required at least
for CRI.

partially fixes #KTIJ-29026
This commit is contained in:
Ilya Chernikov
2024-03-07 15:29:06 +01:00
committed by Space Team
parent 39b05a0a1c
commit 4fafa4b6e9
15 changed files with 65 additions and 24 deletions
@@ -3,4 +3,12 @@ public class Main {
public static String staticField = "";
public void regularMethod() {}
public String regularField = "";
public void invoke() {
}
public static Main INSTANCE = new Main();
public static class Other extends Main {
}
}
@@ -1,4 +1,6 @@
==== INITIAL BUILD ====
Compiling files:
src/instanceUsage0.kt
src/instanceUsage1.kt
src/kotlinUsage.kt
Exit code: OK
@@ -0,0 +1,5 @@
/*p:Main.Other(INSTANCE)*/import /*p:<root>*/Main./*p:Main*/Other.INSTANCE
/*p:<root>*/fun foo() {
/*p:Main(invoke) p:Main.Other*/INSTANCE()
}
@@ -0,0 +1,5 @@
/*p:Main.Other(INSTANCE)*/import Main.Other.INSTANCE
/*p:<root>*/fun foo() {
/*p:Main(invoke) p:Main.Other*/INSTANCE()
}
@@ -0,0 +1,5 @@
import /*p:<root>*/Main./*p:Main*/Other.*
/*p:<root>*/fun bar() {
/*p:<root> p:<root>(invoke) p:Main(invoke) p:Main.Other p:Main.Other(invoke)*/INSTANCE()
}
@@ -0,0 +1,5 @@
import Main.Other.*
/*p:<root>*/fun bar() {
/*p:<root> p:Main(invoke) p:Main.Other*/INSTANCE()
}