Resolve control label locally when label name clashes with fun name

#KT-5354 Fixed
 #KT-15085 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-04-17 16:17:10 +03:00
parent 1c3f546319
commit 6a352bccb6
9 changed files with 162 additions and 22 deletions
@@ -0,0 +1,22 @@
fun test1(): Boolean {
test1@ for(i in 1..2) {
continue@test1
return false
}
return true
}
fun test2(): Boolean {
test2@ while (true) {
break@test2
}
return true
}
fun box(): String {
if (!test1()) return "fail test1"
if (!test2()) return "fail test2"
return "OK"
}