diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt index 77bed77e8dc..719c391ca8f 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt @@ -221,15 +221,19 @@ class MethodInliner( setLambdaInlining(true) val lambdaSMAP = info.node.classSMAP - val sourceMapper = if (inliningContext.classRegeneration && !inliningContext.isInliningLambda) - NestedSourceMapper(sourceMapper, lambdaSMAP.intervals, lambdaSMAP.sourceInfo) - else - InlineLambdaSourceMapper(sourceMapper.parent!!, info.node) + val childSourceMapper = + if (inliningContext.classRegeneration && !inliningContext.isInliningLambda) + NestedSourceMapper(sourceMapper, lambdaSMAP.intervals, lambdaSMAP.sourceInfo) + else if (info is DefaultLambda) { + NestedSourceMapper(sourceMapper.parent!!, lambdaSMAP.intervals, lambdaSMAP.sourceInfo) + } + else InlineLambdaSourceMapper(sourceMapper.parent!!, info.node) + val inliner = MethodInliner( info.node.node, lambdaParameters, inliningContext.subInlineLambda(info), newCapturedRemapper, true /*cause all calls in same module as lambda*/, "Lambda inlining " + info.lambdaClassType.internalName, - sourceMapper, inlineCallSiteInfo, null + childSourceMapper, inlineCallSiteInfo, null ) val varRemapper = LocalVarRemapper(lambdaParameters, valueParamShift) @@ -243,7 +247,7 @@ class MethodInliner( StackValue.onStack(info.invokeMethod.returnType).put(bridge.returnType, this) setLambdaInlining(false) addInlineMarker(this, false) - sourceMapper.endMapping() + childSourceMapper.endMapping() inlineOnlySmapSkipper?.markCallSiteLineNumber(remappingMethodAdapter) } else if (isAnonymousConstructorCall(owner, name)) { //TODO add method diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt new file mode 100644 index 00000000000..42ce6e1de9d --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt @@ -0,0 +1,15 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: bar$default +package test + +inline fun bar(f: () -> String = { "OK" }) = f() +// FILE: 2.kt + +import test.* +// SKIP_INLINE_CHECK_IN: foo$default +inline fun foo(f: () -> String = { bar() }) = f() + +fun box(): String { + return foo() +} + diff --git a/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt new file mode 100644 index 00000000000..bcb63c5cc0f --- /dev/null +++ b/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt @@ -0,0 +1,42 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + + +inline fun lParams(initParams: () -> String = { "OK" }): String { + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return run { + lParams() + } +} + diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt new file mode 100644 index 00000000000..5641fb198b2 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt @@ -0,0 +1,108 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + +inline fun kValue() = "K" + +inline fun lParams(initParams: () -> String = { + "O" + kValue() +}): String { + val z = "body" + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return run { + lParams() + } +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,38:1 +34#1,2:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,38:1 +29#2:39 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +32#1:39 +*E + +// FILE: 2.smap + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,10:1 +31#2,5:11 +29#2:17 +32#3:16 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1,5:11 +5#1:17 +5#1:16 +*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt new file mode 100644 index 00000000000..376d09d84fe --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt @@ -0,0 +1,148 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + +inline fun kValue() = "K" + +inline fun lParams(initParams: () -> String = { + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + "O" + kValue() + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] + //A lot of blank lines [Don't delete] +}): String { + val z = "body" + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return run { + lParams() + } +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,74:1 +70#1,2:75 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,74:1 +29#2:75 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +50#1:75 +*E + +// FILE: 2.smap + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,10:1 +31#2:11 +70#2,2:12 +29#2:15 +50#3:14 +68#3:16 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1:11 +5#1,2:12 +5#1:15 +5#1:14 +5#1:16 +*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt new file mode 100644 index 00000000000..abf2014cc65 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt @@ -0,0 +1,131 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + +inline fun kValue(crossinline s: () -> String) = { s() + "K" }() + +inline fun lParams(initParams: () -> String = { + "" + kValue { "O" } +}): String { + val z = "body" + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return lParams() +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,38:1 +34#1,2:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,38:1 +29#2:39 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +32#1:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,38:1 +32#2:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,38:1 +*E + +// FILE: 2.smap + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,8:1 +31#2,5:9 +29#2:15 +32#3:14 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1,5:9 +5#1:15 +5#1:14 +*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt new file mode 100644 index 00000000000..264b3cd225b --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt @@ -0,0 +1,133 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + +inline fun kValue(crossinline s: () -> String) = { s() + "K" }() + +inline fun lParams(initParams: () -> String = { + "" + kValue { "O" } +}): String { + val z = "body" + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return run { + lParams() + } +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,38:1 +34#1,2:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 ++ 2 1.kt +test/_1Kt +*L +1#1,38:1 +29#2:39 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +32#1:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 ++ 2 1.kt +test/_1Kt$lParams$1 +*L +1#1,38:1 +32#2:39 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$kValue$1 +*L +1#1,38:1 +*E + +// FILE: 2.smap + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,10:1 +31#2,5:11 +29#2:17 +32#3:16 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1,5:11 +5#1:17 +5#1:16 +*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt new file mode 100644 index 00000000000..cefd819aeb6 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt @@ -0,0 +1,95 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + + +inline fun lParams(initParams: () -> String = { + "OK" +}): String { + val z = "body" + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return run { + lParams() + } +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,37:1 +33#1,2:38 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +1#1,37:1 +*E + +// FILE: 2.smap + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,10:1 +30#2,5:11 +31#3:16 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1,5:11 +5#1:16 +*E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt index cc11d7cb7b2..e2aa0adbae5 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt @@ -51,9 +51,12 @@ Kotlin _2Kt + 2 1.kt test/_1Kt ++ 3 1.kt +test/_1Kt$inlineFun$1 *L 1#1,9:1 6#2,2:10 +6#3:12 *E *S KotlinDebug *F @@ -61,4 +64,5 @@ test/_1Kt _2Kt *L 6#1,2:10 +6#1:12 *E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt new file mode 100644 index 00000000000..988f5c2586b --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt @@ -0,0 +1,93 @@ +// FILE: 1.kt +// SKIP_INLINE_CHECK_IN: lParams$default +package test + +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] +//A lot of blank lines [Don't delete] + + +inline fun lParams(initParams: () -> String = { + "OK" +}): String { + val z = "body" + return initParams() +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return lParams() +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,37:1 +33#1,2:38 +*E + +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt$lParams$1 +*L +1#1,37:1 +*E + +// FILE: 2.smap + +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt ++ 3 1.kt +test/_1Kt$lParams$1 +*L +1#1,8:1 +30#2,5:9 +31#3:14 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1,5:9 +5#1:14 +*E \ No newline at end of file diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index e7ddf18c6a1..e001f38a797 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -1234,6 +1234,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli doTest(fileName); } + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); + doTest(fileName); + } + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); @@ -3029,6 +3035,51 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli } } + @TestMetadata("compiler/testData/codegen/boxInline/smap/default") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Default extends AbstractIrBlackBoxInlineCodegenTest { + public void testAllFilesPresentInDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("inlinInDefault.kt") + public void testInlinInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlinInDefault2.kt") + public void testInlinInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault.kt") + public void testInlineAnonymousInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault2.kt") + public void testInlineAnonymousInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt"); + doTest(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 863fca86718..9913d8aba70 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1234,6 +1234,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC doTest(fileName); } + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); + doTest(fileName); + } + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); @@ -3029,6 +3035,51 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @TestMetadata("compiler/testData/codegen/boxInline/smap/default") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Default extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + public void testAllFilesPresentInDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("inlinInDefault.kt") + public void testInlinInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlinInDefault2.kt") + public void testInlinInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault.kt") + public void testInlineAnonymousInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault2.kt") + public void testInlineAnonymousInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt"); + doTest(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 7a88104d6e7..29b30fd4574 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -1234,6 +1234,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo doTest(fileName); } + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); + doTest(fileName); + } + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); @@ -3029,6 +3035,51 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @TestMetadata("compiler/testData/codegen/boxInline/smap/default") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Default extends AbstractBlackBoxInlineCodegenTest { + public void testAllFilesPresentInDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("inlinInDefault.kt") + public void testInlinInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlinInDefault2.kt") + public void testInlinInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault.kt") + public void testInlineAnonymousInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault2.kt") + public void testInlineAnonymousInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt"); + doTest(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 892c5274ebb..4252a32a0df 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -1234,6 +1234,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi doTest(fileName); } + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); + doTest(fileName); + } + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); @@ -3029,6 +3035,51 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @TestMetadata("compiler/testData/codegen/boxInline/smap/default") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Default extends AbstractCompileKotlinAgainstInlineKotlinTest { + public void testAllFilesPresentInDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/default"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("inlinInDefault.kt") + public void testInlinInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlinInDefault2.kt") + public void testInlinInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlinInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault.kt") + public void testInlineAnonymousInDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault.kt"); + doTest(fileName); + } + + @TestMetadata("inlineAnonymousInDefault2.kt") + public void testInlineAnonymousInDefault2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/inlineAnonymousInDefault2.kt"); + doTest(fileName); + } + + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/kt21827.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/default/simple.kt"); + doTest(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java index 691c5a4c082..66f0041f7f5 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java @@ -188,6 +188,12 @@ public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValu throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that."); } + @TestMetadata("kt21827.kt") + public void testKt21827() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); + doTest(fileName); + } + @TestMetadata("noInline.kt") public void testNoInline() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt");