K2: Add test for obsolete KT-51793
^KT-51793 Fixed
This commit is contained in:
committed by
Space Team
parent
c745ef09d1
commit
69a6339935
+12
@@ -27407,6 +27407,18 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793.kt")
|
||||
public void testKt51793() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793Complex.kt")
|
||||
public void testKt51793Complex() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793Complex.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9517.kt")
|
||||
public void testKt9517() throws Exception {
|
||||
|
||||
+12
@@ -27407,6 +27407,18 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793.kt")
|
||||
public void testKt51793() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793Complex.kt")
|
||||
public void testKt51793Complex() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793Complex.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9517.kt")
|
||||
public void testKt9517() throws Exception {
|
||||
|
||||
+12
@@ -27407,6 +27407,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793.kt")
|
||||
public void testKt51793() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793Complex.kt")
|
||||
public void testKt51793Complex() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793Complex.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9517.kt")
|
||||
public void testKt9517() throws Exception {
|
||||
|
||||
+12
@@ -27419,6 +27419,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793.kt")
|
||||
public void testKt51793() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793Complex.kt")
|
||||
public void testKt51793Complex() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793Complex.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9517.kt")
|
||||
public void testKt9517() throws Exception {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-51793
|
||||
interface Key
|
||||
|
||||
interface Builder {
|
||||
operator fun Key.invoke()
|
||||
}
|
||||
|
||||
interface A : Builder
|
||||
interface B : Builder
|
||||
|
||||
val A.k: Key get() = TODO()
|
||||
|
||||
fun A.main() {
|
||||
fun B.bar() {
|
||||
k()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-51793
|
||||
|
||||
interface Key1
|
||||
interface Key2
|
||||
|
||||
interface A1 {
|
||||
operator fun Key2.invoke(): String = ""
|
||||
}
|
||||
interface A2 {
|
||||
operator fun Key1.invoke(): Int = 1
|
||||
}
|
||||
|
||||
val A1.k: Key1 get() = object : Key1 {}
|
||||
val A2.k: Key2 get() = object : Key2 {}
|
||||
|
||||
fun with1(a: A1.() -> Unit) {
|
||||
a(object : A1 {})
|
||||
}
|
||||
fun with2(a: A2.() -> Unit) {
|
||||
a(object : A2 {})
|
||||
}
|
||||
|
||||
fun main() {
|
||||
with1 {
|
||||
with2 {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>k()<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+12
@@ -28233,6 +28233,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793.kt")
|
||||
public void testKt51793() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51793Complex.kt")
|
||||
public void testKt51793Complex() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt51793Complex.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt9517.kt")
|
||||
public void testKt9517() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user