Files
kotlin-fork/compiler/testData/diagnostics/tests/scopes/kt1078.jet
T
Stepan Koltsov 07ff53d456 add trailing newlines to test files
otherwise I have to rollback dozens of files after using sed that follows conventions
2012-03-12 22:54:14 +04:00

17 lines
228 B
Plaintext

//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()