A test for nesting implicitly labeled calls

The actual error message should be "return not allowed", but due to a bug in label resolution it is "unresolved reference"
This commit is contained in:
Andrey Breslav
2013-08-22 14:43:34 +04:00
parent 55eb994502
commit 6cee65d74e
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,14 @@
fun f() {
foo {(): Int ->
bar {
(): Int ->
// The actual error message should be "return not allowed",
// but due to a bug in label resolution it is "unresolved reference"
return<!UNRESOLVED_REFERENCE!>@foo<!> 1
}
return@foo 1
}
}
fun foo(<!UNUSED_PARAMETER!>a<!>: Any) {}
fun bar(<!UNUSED_PARAMETER!>a<!>: Any) {}