Files
kotlin/compiler/testData/codegen/bytecodeText/kt7769.kt
2015-05-21 10:06:01 +03:00

22 lines
363 B
Kotlin
Vendored

interface B<T> {
val bar: T
}
class S(val value: String) {
fun bar() = value
fun foo(): B<String> {
val p = S("OK");
return object : B<String> {
//we shouldn't capture this@S in such case
override val bar: String = p.bar()
}
}
}
fun box(): String {
return S("fail").foo().bar
}
// 0 this$0