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
|
||||
Reference in New Issue
Block a user