Check noinline annotation on non-local return processing

This commit is contained in:
Michael Bogdanov
2014-09-16 15:33:14 +04:00
parent b763aa9995
commit a735d67e86
3 changed files with 43 additions and 18 deletions
@@ -0,0 +1,10 @@
// !DIAGNOSTICS: -NOTHING_TO_INLINE
fun main(args: Array<String>) {
test {
<!RETURN_NOT_ALLOWED!>return<!>
}
}
inline fun test(noinline lambda: () -> Unit) {
lambda()
}