Files
kotlin-fork/compiler/testData/diagnostics/tests/labels/kt4603.kt
T
2015-04-29 14:03:11 +03:00

13 lines
312 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-4603 Labeling information is lost when passing through local classes or objects
fun foo() {
val s: Int.() -> Unit = l@{
class Local(val y: Int = this@l) {
fun bar() {
val x: Int = this@l //unresolved
}
}
}
}