Test that local return has type Nothing

This commit is contained in:
Andrey Breslav
2013-08-21 18:07:58 +04:00
parent aa99c29d8d
commit 3f3ee378f3
2 changed files with 12 additions and 0 deletions
@@ -0,0 +1,7 @@
fun test() {
run1 @f{(): Int ->
(return@f 1): Nothing
}
}
fun run1<T>(f: () -> T): T { return f() }