Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/callDefaultFromInitializer.kt
T
2019-11-19 11:00:09 +03:00

18 lines
243 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun foo(x: Int = 42) = x
class C {
val s: String
init {
val x = foo()
if (x == 42)
s = "OK"
else
s = "fail"
}
}
fun box(): String {
return C().s
}