Perform inline checks in IR tests

This commit is contained in:
Mikhael Bogdanov
2021-01-20 08:07:07 +01:00
parent 216b775095
commit 91717cdcdd
6 changed files with 9 additions and 10 deletions
@@ -4,6 +4,7 @@ package test
inline fun <T> takeT(t: T) {} inline fun <T> takeT(t: T) {}
// FILE: 2.kt // FILE: 2.kt
// NO_CHECK_LAMBDA_INLINING
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD, JVM_MULTI_MODULE_OLD_AGAINST_IR
// FILE: 1.kt // FILE: 1.kt
package test package test
@@ -9,7 +7,7 @@ class B : A
inline fun <T : A> foo(a: Any) = (a as? T != null).toString()[0] inline fun <T : A> foo(a: Any) = (a as? T != null).toString()[0]
// FILE: 2.kt // FILE: 2.kt
// NO_CHECK_LAMBDA_INLINING
import test.* import test.*
fun box(): String { fun box(): String {
@@ -1,8 +1,8 @@
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD // IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt // FILE: 1.kt
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
package builders package builders
inline fun call(crossinline init: () -> Unit) { inline fun call(crossinline init: () -> Unit) {
return init() return init()
} }
@@ -1,8 +1,8 @@
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD // IGNORE_BACKEND_MULTI_MODULE: JVM_IR, JVM_MULTI_MODULE_IR_AGAINST_OLD
// FILE: 1.kt // FILE: 1.kt
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
package builders package builders
inline fun call(crossinline init: () -> Unit) { inline fun call(crossinline init: () -> Unit) {
return init() return init()
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// This test depends on line numbers // This test depends on line numbers
// WITH_RUNTIME // WITH_RUNTIME
// FILE: 1.kt // FILE: 1.kt
// IGNORE_BACKEND_FIR: JVM_IR
package test package test
interface SuspendRunnable { interface SuspendRunnable {
@@ -17,10 +17,10 @@
package org.jetbrains.kotlin.codegen.ir package org.jetbrains.kotlin.codegen.ir
import org.jetbrains.kotlin.ObsoleteTestInfrastructure import org.jetbrains.kotlin.ObsoleteTestInfrastructure
import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTest import org.jetbrains.kotlin.codegen.AbstractBlackBoxInlineCodegenTest
import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.TargetBackend
@OptIn(ObsoleteTestInfrastructure::class) @OptIn(ObsoleteTestInfrastructure::class)
abstract class AbstractIrBlackBoxInlineCodegenTest : AbstractBlackBoxCodegenTest() { abstract class AbstractIrBlackBoxInlineCodegenTest : AbstractBlackBoxInlineCodegenTest() {
override val backend = TargetBackend.JVM_IR override val backend = TargetBackend.JVM_IR
} }