Files
kotlin-fork/compiler/testData/diagnostics/tests/labels/kt3920.kt
T
2015-03-18 16:06:44 +03:00

11 lines
233 B
Kotlin

// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-3920 Labeling information is lost when passing through some expressions
fun test() {
run @f{
val x = if (1 > 2) return@f 1 else 2
2
}
}
fun <T> run(f: () -> T): T = f()