Split JVM backend diagnostics test into IR and non-IR versions
The IR backend no longer generates redundant INLINE_CALL_CYCLEs.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
// TARGET_BACKEND: JVM_OLD
|
||||
inline fun inlineFun1(crossinline p: () -> Unit) {
|
||||
object {
|
||||
fun method() { <!INLINE_CALL_CYCLE, INLINE_CALL_CYCLE!>inlineFun2(p)<!> }
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
/indirectInlineCycle_ir.kt:8:24: error: the 'inlineFun2' invocation is a part of inline cycle
|
||||
fun method() { inlineFun2(p) }
|
||||
^
|
||||
/indirectInlineCycle_ir.kt:13:5: error: the 'inlineFun1' invocation is a part of inline cycle
|
||||
inlineFun1(p)
|
||||
^
|
||||
@@ -0,0 +1,11 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
inline fun inlineFun1(crossinline p: () -> Unit) {
|
||||
object {
|
||||
fun method() { <!INLINE_CALL_CYCLE!>inlineFun2(p)<!> }
|
||||
}
|
||||
}
|
||||
|
||||
inline fun inlineFun2(crossinline p: () -> Unit) {
|
||||
<!INLINE_CALL_CYCLE!>inlineFun1(p)<!>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public inline fun inlineFun1(/*0*/ crossinline p: () -> kotlin.Unit): kotlin.Unit
|
||||
public inline fun inlineFun2(/*0*/ crossinline p: () -> kotlin.Unit): kotlin.Unit
|
||||
@@ -1,5 +1,5 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
// TARGET_BACKEND: JVM_OLD
|
||||
inline fun inlineFun1(p: () -> Unit) {
|
||||
p()
|
||||
<!INLINE_CALL_CYCLE, INLINE_CALL_CYCLE!>inlineFun2(p)<!>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/inlineCycle_ir.kt:8:5: error: the 'inlineFun2' invocation is a part of inline cycle
|
||||
inlineFun2(p)
|
||||
^
|
||||
/inlineCycle_ir.kt:13:5: error: the 'inlineFun1' invocation is a part of inline cycle
|
||||
inlineFun1(p)
|
||||
^
|
||||
@@ -0,0 +1,11 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
inline fun inlineFun1(p: () -> Unit) {
|
||||
p()
|
||||
<!INLINE_CALL_CYCLE!>inlineFun2(p)<!>
|
||||
}
|
||||
|
||||
inline fun inlineFun2(p: () -> Unit) {
|
||||
p()
|
||||
<!INLINE_CALL_CYCLE!>inlineFun1(p)<!>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public inline fun inlineFun1(/*0*/ p: () -> kotlin.Unit): kotlin.Unit
|
||||
public inline fun inlineFun2(/*0*/ p: () -> kotlin.Unit): kotlin.Unit
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
/suspendInlineCycle_ir.kt:8:5: error: the 'inlineFun2' invocation is a part of inline cycle
|
||||
inlineFun2(p)
|
||||
^
|
||||
/suspendInlineCycle_ir.kt:13:5: error: the 'inlineFun1' invocation is a part of inline cycle
|
||||
inlineFun1(p)
|
||||
^
|
||||
@@ -0,0 +1,11 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
suspend inline fun inlineFun1(p: () -> Unit) {
|
||||
p()
|
||||
<!INLINE_CALL_CYCLE!>inlineFun2(p)<!>
|
||||
}
|
||||
|
||||
suspend inline fun inlineFun2(p: () -> Unit) {
|
||||
p()
|
||||
<!INLINE_CALL_CYCLE!>inlineFun1(p)<!>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public suspend inline fun inlineFun1(/*0*/ p: () -> kotlin.Unit): kotlin.Unit
|
||||
public suspend inline fun inlineFun2(/*0*/ p: () -> kotlin.Unit): kotlin.Unit
|
||||
Generated
+11
-6
@@ -29,14 +29,19 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("indirectInlineCycle.kt")
|
||||
public void testIndirectInlineCycle() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/indirectInlineCycle.kt");
|
||||
@TestMetadata("indirectInlineCycle_ir.kt")
|
||||
public void testIndirectInlineCycle_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/indirectInlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCycle.kt")
|
||||
public void testInlineCycle() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/inlineCycle.kt");
|
||||
@TestMetadata("inlineCycle_ir.kt")
|
||||
public void testInlineCycle_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/inlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendInlineCycle_ir.kt")
|
||||
public void testSuspendInlineCycle_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/suspendInlineCycle_ir.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature")
|
||||
|
||||
Reference in New Issue
Block a user