Copy nested objects of default lambda during inline

This commit is contained in:
Mikhael Bogdanov
2017-12-20 14:05:33 +01:00
parent 3513f1a86a
commit f4f7c83eeb
10 changed files with 392 additions and 181 deletions
@@ -231,7 +231,8 @@ class MethodInliner(
val inliner = MethodInliner(
info.node.node, lambdaParameters, inliningContext.subInlineLambda(info),
newCapturedRemapper, true /*cause all calls in same module as lambda*/,
newCapturedRemapper,
if (info is DefaultLambda) isSameModule else true /*cause all nested objects in same module as lambda*/,
"Lambda inlining " + info.lambdaClassType.internalName,
childSourceMapper, inlineCallSiteInfo, null
)
@@ -0,0 +1,140 @@
// 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
*L
1#1,38:1
*E
SMAP
1.kt
Kotlin
*S Kotlin
*F
+ 1 1.kt
test/_1Kt$lParams$1$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$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$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
32#3:14
*E
*S KotlinDebug
*F
+ 1 2.kt
_2Kt
*L
5#1,5:9
5#1:14
*E
@@ -0,0 +1,20 @@
// TARGET_BACKEND: JVM
// FILE: A.kt
package test
inline fun test(s: () -> () -> String = { val z = "Outer"; { "OK" } }) =
s()
val same = test()
// FILE: B.kt
import test.*
fun box(): String {
val inlined = test()
if (same::class.java == inlined::class.java) return "fail 1 : ${same::class.java} == ${inlined::class.java}"
println (inlined::class.java)
return inlined()
}
@@ -0,0 +1,20 @@
// TARGET_BACKEND: JVM
// FILE: A.kt
package test
inline fun test(s: () -> () -> () -> String = { val z = "Outer"; { { "OK" } } }) =
s()
val same = test()
// FILE: B.kt
import test.*
fun box(): String {
val inlined = test()
if (same::class.java == inlined::class.java) return "fail 1 : ${same::class.java} == ${inlined::class.java}"
if (same()::class.java == inlined()::class.java) return "fail 2 : ${same()::class.java} == ${inlined()::class.java}"
return inlined()()
}
@@ -1210,6 +1210,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultCallInDefaultLambda.kt")
public void testDefaultCallInDefaultLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt");
doTest(fileName);
}
@TestMetadata("defaultLambdaInNoInline.kt")
public void testDefaultLambdaInNoInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt");
@@ -3035,51 +3041,6 @@ 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)
@@ -3088,6 +3049,42 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultLambdaInAnonymous.kt")
public void testDefaultLambdaInAnonymous() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault.kt")
public void testInlinInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault2.kt")
public void testInlinInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault.kt")
public void testInlineAnonymousInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault2.kt")
public void testInlineAnonymousInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt");
doTest(fileName);
}
@TestMetadata("kt21827.kt")
public void testKt21827() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt");
doTest(fileName);
}
@TestMetadata("nested.kt")
public void testNested() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt");
@@ -3099,6 +3096,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt");
doTest(fileName);
}
@TestMetadata("simple2.kt")
public void testSimple2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly")
@@ -1210,6 +1210,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultCallInDefaultLambda.kt")
public void testDefaultCallInDefaultLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt");
doTest(fileName);
}
@TestMetadata("defaultLambdaInNoInline.kt")
public void testDefaultLambdaInNoInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt");
@@ -3035,51 +3041,6 @@ 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)
@@ -3088,6 +3049,42 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultLambdaInAnonymous.kt")
public void testDefaultLambdaInAnonymous() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault.kt")
public void testInlinInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault2.kt")
public void testInlinInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault.kt")
public void testInlineAnonymousInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault2.kt")
public void testInlineAnonymousInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt");
doTest(fileName);
}
@TestMetadata("kt21827.kt")
public void testKt21827() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt");
doTest(fileName);
}
@TestMetadata("nested.kt")
public void testNested() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt");
@@ -3099,6 +3096,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt");
doTest(fileName);
}
@TestMetadata("simple2.kt")
public void testSimple2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly")
@@ -1210,6 +1210,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultCallInDefaultLambda.kt")
public void testDefaultCallInDefaultLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt");
doTest(fileName);
}
@TestMetadata("defaultLambdaInNoInline.kt")
public void testDefaultLambdaInNoInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt");
@@ -3035,51 +3041,6 @@ 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)
@@ -3088,6 +3049,42 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultLambdaInAnonymous.kt")
public void testDefaultLambdaInAnonymous() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault.kt")
public void testInlinInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault2.kt")
public void testInlinInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault.kt")
public void testInlineAnonymousInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault2.kt")
public void testInlineAnonymousInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt");
doTest(fileName);
}
@TestMetadata("kt21827.kt")
public void testKt21827() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt");
doTest(fileName);
}
@TestMetadata("nested.kt")
public void testNested() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt");
@@ -3099,6 +3096,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt");
doTest(fileName);
}
@TestMetadata("simple2.kt")
public void testSimple2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly")
@@ -1210,6 +1210,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultCallInDefaultLambda.kt")
public void testDefaultCallInDefaultLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt");
doTest(fileName);
}
@TestMetadata("defaultLambdaInNoInline.kt")
public void testDefaultLambdaInNoInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt");
@@ -3035,51 +3041,6 @@ 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)
@@ -3088,6 +3049,42 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("defaultLambdaInAnonymous.kt")
public void testDefaultLambdaInAnonymous() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault.kt")
public void testInlinInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlinInDefault2.kt")
public void testInlinInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault.kt")
public void testInlineAnonymousInDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt");
doTest(fileName);
}
@TestMetadata("inlineAnonymousInDefault2.kt")
public void testInlineAnonymousInDefault2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt");
doTest(fileName);
}
@TestMetadata("kt21827.kt")
public void testKt21827() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt");
doTest(fileName);
}
@TestMetadata("nested.kt")
public void testNested() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt");
@@ -3099,6 +3096,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt");
doTest(fileName);
}
@TestMetadata("simple2.kt")
public void testSimple2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly")
@@ -102,6 +102,18 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
doTest(fileName);
}
@TestMetadata("defaultLambdaRegeneration.kt")
public void testDefaultLambdaRegeneration() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt");
doTest(fileName);
}
@TestMetadata("defaultLambdaRegeneration2.kt")
public void testDefaultLambdaRegeneration2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt");
doTest(fileName);
}
@TestMetadata("doublyNestedClass.kt")
public void testDoublyNestedClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt");
@@ -158,6 +158,12 @@ public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValu
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("defaultCallInDefaultLambda.kt")
public void testDefaultCallInDefaultLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt");
doTest(fileName);
}
@TestMetadata("defaultLambdaInNoInline.kt")
public void testDefaultLambdaInNoInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt");