mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
10 lines
252 B
Kotlin
Vendored
10 lines
252 B
Kotlin
Vendored
var result = "fail"
|
|
|
|
open class Base(val o: String, val k: String)
|
|
|
|
fun box(): String {
|
|
val obj1 = object : Base(k = { result = "O"; "K"}() , o = {result += "K"; "O"}()) {}
|
|
|
|
if (result != "OK") return "fail $result"
|
|
return obj1.o + obj1.k
|
|
} |