Files
kotlin-fork/compiler/testData/diagnostics/tests/labels/kt4603.kt
T
Svetlana Isakova 69e5444ddf Added tests on labels
#KT-1703 Fixed
 #KT-361 Fixed
 #KT-3920 Fixed
 #KT-3988 Fixed
 #KT-4247 Fixed
 #KT-4586 Fixed
 #KT-4603 Fixed
 #KT-591 Fixed
2014-05-20 15:06:59 +04:00

13 lines
306 B
Kotlin

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