Fix for KT-7273: Bad local variable type when using non-local return

#KT-7273 Fixed
This commit is contained in:
Michael Bogdanov
2015-04-15 14:07:10 +03:00
parent 51d5b52f69
commit 0080ebd386
11 changed files with 80 additions and 20 deletions
@@ -0,0 +1,10 @@
fun box(): String {
try {
test {
return@box "OK"
}
} finally {
}
return "fail"
}
@@ -0,0 +1,8 @@
inline fun <R> test(s: () -> R): R {
var b = false
try {
return s()
} finally {
!b
}
}