Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt
T
2019-10-08 17:19:41 +02:00

21 lines
403 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: A.kt
package test
inline fun test(s: () -> () -> String = { val z = "Outer"; { "OK" } }) =
s()
val same = test()
// FILE: B.kt
import test.*
fun box(): String {
val inlined = test()
if (same::class.java == inlined::class.java) return "fail 1 : ${same::class.java} == ${inlined::class.java}"
println (inlined::class.java)
return inlined()
}