Files
kotlin-fork/backend.native/tests/external/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt
T
2017-03-13 15:31:46 +03:00

9 lines
171 B
Kotlin

class A(val f: () -> Int) {
constructor() : this({ 23 })
}
fun box(): String {
val result = A().f()
if (result != 23) return "fail: $result"
return "OK"
}