[FIR-TEST] Add test with ambiguity in static java scopes
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
// FILE: A.java
|
||||||
|
|
||||||
|
class A {
|
||||||
|
public static final A VALUE = new A();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: B.java
|
||||||
|
|
||||||
|
class B extends A {
|
||||||
|
public static final B VALUE = new B();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
val b = B.<!AMBIGUITY!>VALUE<!> // <- should be B
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
FILE: main.kt
|
||||||
|
public final fun main(): R|kotlin/Unit| {
|
||||||
|
lval b: <ERROR TYPE REF: Ambiguity: VALUE, [/B.VALUE, /A.VALUE]> = Q|B|.<Ambiguity: VALUE, [/B.VALUE, /A.VALUE]>#
|
||||||
|
}
|
||||||
+5
@@ -893,6 +893,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
|||||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaFieldVsAccessor.kt");
|
runTest("compiler/fir/resolve/testData/resolve/problems/javaFieldVsAccessor.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("javaStaticScopeInheritance.kt")
|
||||||
|
public void testJavaStaticScopeInheritance() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/problems/javaStaticScopeInheritance.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("localFunctionsHiding.kt")
|
@TestMetadata("localFunctionsHiding.kt")
|
||||||
public void testLocalFunctionsHiding() throws Exception {
|
public void testLocalFunctionsHiding() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.kt");
|
runTest("compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user