[NI] Fix hierarchy of resolution atoms for lambda with non-local return

This commit is contained in:
Mikhail Zarechenskiy
2017-12-11 17:22:26 +03:00
parent c6d8b39b4f
commit 9eca8cd451
6 changed files with 60 additions and 9 deletions
@@ -0,0 +1,28 @@
fun <T> outer(command: () -> T) : T = command()
inline fun <K> inner(action: () -> K): K = action()
fun test1(): String {
outer {
inner {
return@outer
}
}
return "O"
}
fun test2(): String {
outer {
return@outer
inner {
}
}
return "K"
}
fun box(): String {
return test1() + test2()
}