diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 084e2e43893..ee2e7f2c1d5 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -6770,6 +6770,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/suspendJavaOverrides.kt"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines"); @@ -16911,6 +16916,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); diff --git a/compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt b/compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt new file mode 100644 index 00000000000..3892ac25b29 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt @@ -0,0 +1,13 @@ +suspend fun susp() {} + +interface I { + + suspend fun problematic() { + run { + susp() + } + } +} + +// We only test compilation. +fun box() = "OK" diff --git a/compiler/testData/codegen/box/inlineClasses/kt27096_innerClass.kt b/compiler/testData/codegen/box/inlineClasses/kt27096_innerClass.kt index 6289faff98a..0e34c322001 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt27096_innerClass.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt27096_innerClass.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +InlineClasses -// IGNORE_BACKEND_FIR: JVM_IR class Outer(val x: X) { inner class Inner(val y: Y) { diff --git a/compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt b/compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt new file mode 100644 index 00000000000..769b77915ef --- /dev/null +++ b/compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt @@ -0,0 +1,11 @@ +class Q { + fun qz(x: T, block: (T) -> String) = block(x) + + fun problematic(): String { + class CC + + return qz(CC::class) { "OK" } + } +} + +fun box() = Q().problematic() diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index b3848663d69..58c578dd8a3 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -7190,6 +7190,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/suspendJavaOverrides.kt"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines.experimental"); @@ -18136,6 +18141,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 426661c4b00..e00fbb1f4fc 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -7190,6 +7190,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/coroutines/suspendJavaOverrides.kt"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_2() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines.experimental"); @@ -18141,6 +18146,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 27aad63307e..4bd889b18ff 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -6770,6 +6770,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/suspendJavaOverrides.kt"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines"); @@ -16911,6 +16916,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 971f1aa4ad0..5dd9cb03c72 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -5725,6 +5725,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt", "kotlin.coroutines"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines"); @@ -13626,6 +13631,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index dcc588d8262..b8126762ae4 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -5725,6 +5725,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt", "kotlin.coroutines"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines"); @@ -13626,6 +13631,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index a07444c6f33..f9be5685134 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -5725,6 +5725,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt", "kotlin.coroutines"); } + @TestMetadata("suspendLambdaInInterface.kt") + public void testSuspendLambdaInInterface() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendLambdaInInterface.kt"); + } + @TestMetadata("suspendLambdaWithArgumentRearrangement.kt") public void testSuspendLambdaWithArgumentRearrangement_1_3() throws Exception { runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/suspendLambdaWithArgumentRearrangement.kt", "kotlin.coroutines"); @@ -13691,6 +13696,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } + @TestMetadata("localGenericWithTypeParameters.kt") + public void testLocalGenericWithTypeParameters() throws Exception { + runTest("compiler/testData/codegen/box/localClasses/localGenericWithTypeParameters.kt"); + } + @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt");