Add a test where classes call inline functions from each other
This commit is contained in:
@@ -0,0 +1,98 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
package test
|
||||||
|
|
||||||
|
class A {
|
||||||
|
inline fun a() = B().b()
|
||||||
|
inline fun c() = B().d()
|
||||||
|
}
|
||||||
|
|
||||||
|
class B {
|
||||||
|
inline fun b() = A().c()
|
||||||
|
inline fun d() = "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
import test.*
|
||||||
|
|
||||||
|
fun box() = A().a()
|
||||||
|
|
||||||
|
// FILE: 1.smap
|
||||||
|
SMAP
|
||||||
|
1.kt
|
||||||
|
Kotlin
|
||||||
|
*S Kotlin
|
||||||
|
*F
|
||||||
|
+ 1 1.kt
|
||||||
|
test/B
|
||||||
|
+ 2 1.kt
|
||||||
|
test/A
|
||||||
|
*L
|
||||||
|
1#1,14:1
|
||||||
|
11#1:16
|
||||||
|
6#2:15
|
||||||
|
*E
|
||||||
|
*S KotlinDebug
|
||||||
|
*F
|
||||||
|
+ 1 1.kt
|
||||||
|
test/B
|
||||||
|
*L
|
||||||
|
10#1:16
|
||||||
|
10#1:15
|
||||||
|
*E
|
||||||
|
|
||||||
|
SMAP
|
||||||
|
1.kt
|
||||||
|
Kotlin
|
||||||
|
*S Kotlin
|
||||||
|
*F
|
||||||
|
+ 1 1.kt
|
||||||
|
test/A
|
||||||
|
+ 2 1.kt
|
||||||
|
test/B
|
||||||
|
*L
|
||||||
|
1#1,14:1
|
||||||
|
6#1:16
|
||||||
|
10#2:15
|
||||||
|
11#2:17
|
||||||
|
11#2:18
|
||||||
|
*E
|
||||||
|
*S KotlinDebug
|
||||||
|
*F
|
||||||
|
+ 1 1.kt
|
||||||
|
test/A
|
||||||
|
*L
|
||||||
|
5#1:16
|
||||||
|
5#1:15
|
||||||
|
5#1:17
|
||||||
|
6#1:18
|
||||||
|
*E
|
||||||
|
|
||||||
|
// FILE: 2.smap
|
||||||
|
SMAP
|
||||||
|
2.kt
|
||||||
|
Kotlin
|
||||||
|
*S Kotlin
|
||||||
|
*F
|
||||||
|
+ 1 2.kt
|
||||||
|
_2Kt
|
||||||
|
+ 2 1.kt
|
||||||
|
test/A
|
||||||
|
+ 3 1.kt
|
||||||
|
test/B
|
||||||
|
*L
|
||||||
|
1#1,6:1
|
||||||
|
5#2:7
|
||||||
|
6#2:9
|
||||||
|
10#3:8
|
||||||
|
11#3:10
|
||||||
|
*E
|
||||||
|
*S KotlinDebug
|
||||||
|
*F
|
||||||
|
+ 1 2.kt
|
||||||
|
_2Kt
|
||||||
|
*L
|
||||||
|
4#1:7
|
||||||
|
4#1:9
|
||||||
|
4#1:8
|
||||||
|
4#1:10
|
||||||
|
*E
|
||||||
+5
@@ -3265,6 +3265,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("classCycle.kt")
|
||||||
|
public void testClassCycle() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classFromDefaultPackage.kt")
|
@TestMetadata("classFromDefaultPackage.kt")
|
||||||
public void testClassFromDefaultPackage() throws Exception {
|
public void testClassFromDefaultPackage() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
||||||
|
|||||||
Generated
+5
@@ -3265,6 +3265,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("classCycle.kt")
|
||||||
|
public void testClassCycle() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classFromDefaultPackage.kt")
|
@TestMetadata("classFromDefaultPackage.kt")
|
||||||
public void testClassFromDefaultPackage() throws Exception {
|
public void testClassFromDefaultPackage() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
||||||
|
|||||||
+5
@@ -3265,6 +3265,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("classCycle.kt")
|
||||||
|
public void testClassCycle() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classFromDefaultPackage.kt")
|
@TestMetadata("classFromDefaultPackage.kt")
|
||||||
public void testClassFromDefaultPackage() throws Exception {
|
public void testClassFromDefaultPackage() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
||||||
|
|||||||
Generated
+5
@@ -3265,6 +3265,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("classCycle.kt")
|
||||||
|
public void testClassCycle() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classFromDefaultPackage.kt")
|
@TestMetadata("classFromDefaultPackage.kt")
|
||||||
public void testClassFromDefaultPackage() throws Exception {
|
public void testClassFromDefaultPackage() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
||||||
|
|||||||
Generated
+5
@@ -2880,6 +2880,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("classCycle.kt")
|
||||||
|
public void testClassCycle() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classFromDefaultPackage.kt")
|
@TestMetadata("classFromDefaultPackage.kt")
|
||||||
public void testClassFromDefaultPackage() throws Exception {
|
public void testClassFromDefaultPackage() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
||||||
|
|||||||
+5
@@ -2880,6 +2880,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
|||||||
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/assertion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("classCycle.kt")
|
||||||
|
public void testClassCycle() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/smap/classCycle.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("classFromDefaultPackage.kt")
|
@TestMetadata("classFromDefaultPackage.kt")
|
||||||
public void testClassFromDefaultPackage() throws Exception {
|
public void testClassFromDefaultPackage() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user