K2: reproduce KT-57880
This commit is contained in:
committed by
Space Team
parent
ed4cc99db3
commit
089222cecc
+6
@@ -21032,6 +21032,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labelToOuterLambda.kt")
|
||||
public void testLabelToOuterLambda() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelToOuterLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labeledFunctionLiteral.kt")
|
||||
public void testLabeledFunctionLiteral() throws Exception {
|
||||
|
||||
+6
@@ -21032,6 +21032,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labelToOuterLambda.kt")
|
||||
public void testLabelToOuterLambda() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelToOuterLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labeledFunctionLiteral.kt")
|
||||
public void testLabeledFunctionLiteral() throws Exception {
|
||||
|
||||
+6
@@ -21032,6 +21032,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labelToOuterLambda.kt")
|
||||
public void testLabelToOuterLambda() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelToOuterLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labeledFunctionLiteral.kt")
|
||||
public void testLabeledFunctionLiteral() throws Exception {
|
||||
|
||||
+6
@@ -21038,6 +21038,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labelToOuterLambda.kt")
|
||||
public void testLabelToOuterLambda() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelToOuterLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labeledFunctionLiteral.kt")
|
||||
public void testLabeledFunctionLiteral() throws Exception {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// ISSUE: KT-57880
|
||||
|
||||
fun outerLambda(action: String.() -> Unit) {}
|
||||
var lambda: Int.() -> Unit = {}
|
||||
fun consume(arg: String) {}
|
||||
|
||||
fun main() {
|
||||
outerLambda {
|
||||
lambda = {
|
||||
consume(<!ARGUMENT_TYPE_MISMATCH!>this@outerLambda<!>)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// ISSUE: KT-57880
|
||||
|
||||
fun outerLambda(action: String.() -> Unit) {}
|
||||
var lambda: Int.() -> Unit = {}
|
||||
fun consume(arg: String) {}
|
||||
|
||||
fun main() {
|
||||
outerLambda {
|
||||
lambda = {
|
||||
consume(this@outerLambda)
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -21038,6 +21038,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labelToOuterLambda.kt")
|
||||
public void testLabelToOuterLambda() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/labels/labelToOuterLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("labeledFunctionLiteral.kt")
|
||||
public void testLabeledFunctionLiteral() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user