Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/kt1078.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

17 lines
228 B
Kotlin

//KT-1078 Problem with visibility in do-while
package kt1078
fun test() : B {
do {
val x = foo()
} while(x.bar()) // x is not visible here!
return B()
}
class B() {
fun bar() = true
}
fun foo() = B()