Files
kotlin-fork/compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt
T
2018-06-28 12:26:41 +02:00

28 lines
425 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
package test
var s: Int = 1;
inline fun Int.inlineMethod() : Int {
noInlineLambda()
return noInlineLambda()
}
inline fun Int.noInlineLambda() = { s++ } ()
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun test1(): Int {
return 1.inlineMethod()
}
fun box(): String {
val result = test1()
if (result != 2) return "test1: ${result}"
return "OK"
}