FIR: Add test for discrepancy in call resolution for qualifiers with old FE
^KT-38031 Open
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// FILE: W.java
|
||||
public class W {
|
||||
public static class E {
|
||||
public static String w = "";
|
||||
}
|
||||
|
||||
public static String E() {return "";}
|
||||
|
||||
public static final String E = "";
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
fun main() {
|
||||
W.E().length // ambiguity in old FE, resolved to static method in FIR
|
||||
W.E.length // resolved to static field in FIR and old FE
|
||||
W.E.<!UNRESOLVED_REFERENCE!>w<!> // resolved to static field in FE
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
FILE: main.kt
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
Q|W|.R|/W.E|().R|kotlin/String.length|
|
||||
Q|W|.R|/W.E|.R|kotlin/String.length|
|
||||
Q|W|.R|/W.E|.<Unresolved name: w>#
|
||||
}
|
||||
Generated
+5
@@ -1586,6 +1586,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/javaArrayInGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaQualifier.kt")
|
||||
public void testJavaQualifier() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/javaQualifier.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleJavaClassesInOneFile.kt")
|
||||
public void testMultipleJavaClassesInOneFile() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/multipleJavaClassesInOneFile.kt");
|
||||
|
||||
+5
@@ -1586,6 +1586,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/javaArrayInGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaQualifier.kt")
|
||||
public void testJavaQualifier() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/javaQualifier.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleJavaClassesInOneFile.kt")
|
||||
public void testMultipleJavaClassesInOneFile() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/multipleJavaClassesInOneFile.kt");
|
||||
|
||||
Reference in New Issue
Block a user