KT-1078 Problem with visibility in do-while

This commit is contained in:
svtk
2012-01-20 14:52:48 +04:00
parent b4b1ec1bb5
commit 8ec8fa47a4
2 changed files with 28 additions and 2 deletions
@@ -0,0 +1,16 @@
//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()