[FIR-TEST] Add test with ambiguity between java field and java accessor
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// FILE: A.java
|
||||
|
||||
public class A {
|
||||
public int x;
|
||||
|
||||
public String getX() {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun test(a: A) {
|
||||
val int = a.<!AMBIGUITY!>x<!> // <- should be int
|
||||
val string = a.getX()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
FILE: main.kt
|
||||
public final fun test(a: R|A|): R|kotlin/Unit| {
|
||||
lval int: <ERROR TYPE REF: Ambiguity: x, [/A.x, /A.x]> = R|<local>/a|.<Ambiguity: x, [/A.x, /A.x]>#
|
||||
lval string: R|ft<kotlin/String, kotlin/String?>!| = R|<local>/a|.R|/A.getX|()
|
||||
}
|
||||
+5
@@ -883,6 +883,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaFieldVsAccessor.kt")
|
||||
public void testJavaFieldVsAccessor() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaFieldVsAccessor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctionsHiding.kt")
|
||||
public void testLocalFunctionsHiding() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.kt");
|
||||
|
||||
Reference in New Issue
Block a user