[FIR] Add test for ambiguity in nested class constructor call
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
class A() {
|
||||||
|
class B() : A() {
|
||||||
|
fun copy() = <!AMBIGUITY!>B<!>()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
FILE: nestedClassContructor.kt
|
||||||
|
public final class A : R|kotlin/Any| {
|
||||||
|
public constructor(): R|A| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class B : R|A| {
|
||||||
|
public constructor(): R|A.B| {
|
||||||
|
super<R|A|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public final fun copy(): <ERROR TYPE REF: Empty diagnostic> {
|
||||||
|
^copy <Ambiguity: B, [/A.B.B, /A.B.B]>#()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+5
@@ -133,6 +133,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
|||||||
runTest("compiler/fir/resolve/testData/resolve/nestedClass.kt");
|
runTest("compiler/fir/resolve/testData/resolve/nestedClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("nestedClassContructor.kt")
|
||||||
|
public void testNestedClassContructor() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/nestedClassContructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NestedOfAliasedType.kt")
|
@TestMetadata("NestedOfAliasedType.kt")
|
||||||
public void testNestedOfAliasedType() throws Exception {
|
public void testNestedOfAliasedType() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/NestedOfAliasedType.kt");
|
runTest("compiler/fir/resolve/testData/resolve/NestedOfAliasedType.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user