Function literal is now expression and function simultaneously for purposes of annotation target checking

This commit is contained in:
Mikhail Glukhikh
2015-09-21 16:20:36 +03:00
parent 997e9a7dd7
commit dd4601fd08
6 changed files with 44 additions and 5 deletions
@@ -7,5 +7,5 @@ fun transform(i: Int, tr: (Int) -> Int): Int = <!WRONG_ANNOTATION_TARGET!>@base<
@base <!WRONG_ANNOTATION_TARGET!>@special<!> fun foo(i: Int): Int {
val j = <!WRONG_ANNOTATION_TARGET!>@base<!> @special i + 1
if (j == 1) return foo(@special <!WRONG_ANNOTATION_TARGET!>@base<!> 42)
return transform(@special j, <!WRONG_ANNOTATION_TARGET!>@base<!> @special { @special it * 2 })
return transform(@special j, @base @special { @special it * 2 })
}