Add minor test for SMAP
Relates to PR 3248
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
|
||||||
|
package test
|
||||||
|
|
||||||
|
object A {
|
||||||
|
inline fun test(s: () -> Unit) {
|
||||||
|
s()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object B {
|
||||||
|
inline fun test2(s: () -> Unit) {
|
||||||
|
s()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
// NO_CHECK_LAMBDA_INLINING
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
var z = "fail"
|
||||||
|
|
||||||
|
B.test2 {
|
||||||
|
{ // regenerated object in inline lambda
|
||||||
|
A.test {
|
||||||
|
z = "OK"
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
return z;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 1.smap
|
||||||
|
|
||||||
|
// FILE: 2.smap
|
||||||
|
SMAP
|
||||||
|
2.kt
|
||||||
|
Kotlin
|
||||||
|
*S Kotlin
|
||||||
|
*F
|
||||||
|
+ 1 2.kt
|
||||||
|
_2Kt
|
||||||
|
+ 2 1.kt
|
||||||
|
test/B
|
||||||
|
*L
|
||||||
|
1#1,19:1
|
||||||
|
13#2,2:20
|
||||||
|
*E
|
||||||
|
*S KotlinDebug
|
||||||
|
*F
|
||||||
|
+ 1 2.kt
|
||||||
|
_2Kt
|
||||||
|
*L
|
||||||
|
9#1,2:20
|
||||||
|
*E
|
||||||
|
|
||||||
|
SMAP
|
||||||
|
2.kt
|
||||||
|
Kotlin
|
||||||
|
*S Kotlin
|
||||||
|
*F
|
||||||
|
+ 1 2.kt
|
||||||
|
_2Kt$box$1$1
|
||||||
|
+ 2 1.kt
|
||||||
|
test/A
|
||||||
|
*L
|
||||||
|
1#1,19:1
|
||||||
|
7#2,2:20
|
||||||
|
*E
|
||||||
|
*S KotlinDebug
|
||||||
|
*F
|
||||||
|
+ 1 2.kt
|
||||||
|
_2Kt$box$1$1
|
||||||
|
*L
|
||||||
|
11#1,2:20
|
||||||
|
*E
|
||||||
+5
@@ -121,6 +121,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineCallInsideInlineLambda.kt")
|
||||||
|
public void testInlineCallInsideInlineLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt13133.kt")
|
@TestMetadata("kt13133.kt")
|
||||||
public void testKt13133() throws Exception {
|
public void testKt13133() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
||||||
|
|||||||
Generated
+5
@@ -121,6 +121,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineCallInsideInlineLambda.kt")
|
||||||
|
public void testInlineCallInsideInlineLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt13133.kt")
|
@TestMetadata("kt13133.kt")
|
||||||
public void testKt13133() throws Exception {
|
public void testKt13133() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
||||||
|
|||||||
+5
@@ -121,6 +121,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineCallInsideInlineLambda.kt")
|
||||||
|
public void testInlineCallInsideInlineLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt13133.kt")
|
@TestMetadata("kt13133.kt")
|
||||||
public void testKt13133() throws Exception {
|
public void testKt13133() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
||||||
|
|||||||
Generated
+5
@@ -121,6 +121,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineCallInsideInlineLambda.kt")
|
||||||
|
public void testInlineCallInsideInlineLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt13133.kt")
|
@TestMetadata("kt13133.kt")
|
||||||
public void testKt13133() throws Exception {
|
public void testKt13133() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt");
|
||||||
|
|||||||
Generated
+5
@@ -121,6 +121,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineCallInsideInlineLambda.kt")
|
||||||
|
public void testInlineCallInsideInlineLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt13182.kt")
|
@TestMetadata("kt13182.kt")
|
||||||
public void testKt13182() throws Exception {
|
public void testKt13182() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt");
|
||||||
|
|||||||
+5
@@ -121,6 +121,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineCallInsideInlineLambda.kt")
|
||||||
|
public void testInlineCallInsideInlineLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/inlineCallInsideInlineLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt13182.kt")
|
@TestMetadata("kt13182.kt")
|
||||||
public void testKt13182() throws Exception {
|
public void testKt13182() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt");
|
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user