15 lines
190 B
Kotlin
Vendored
15 lines
190 B
Kotlin
Vendored
class B () {}
|
|
|
|
open class A(val b : B) {
|
|
fun a(): A = object: A(b) {}
|
|
}
|
|
|
|
fun box() : String {
|
|
val b = B()
|
|
val a = A(b).a()
|
|
|
|
if (a.b !== b) return "failed"
|
|
|
|
return "OK"
|
|
}
|