Added dianostic error for non-local return on disabled inlines,

Render bytecode diagnostics in BytecodeToolWindow

  #KT-5584 Fixed
This commit is contained in:
Michael Bogdanov
2015-05-20 15:04:59 +03:00
parent ef4981b0ef
commit 5bca1d3c8f
8 changed files with 71 additions and 2 deletions
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/nonLocalDisabled.kt
-Xno-inline
-d
$TEMP_DIR$
@@ -0,0 +1,13 @@
fun a() {
c {
return
}
c {
return@a
}
}
inline fun c(p: () -> Unit) {
p()
}
@@ -0,0 +1,3 @@
ERROR: compiler/testData/cli/jvm/nonLocalDisabled.kt: (3, 9) Non-local returns are not allowed with inlining disabled
ERROR: compiler/testData/cli/jvm/nonLocalDisabled.kt: (7, 9) Non-local returns are not allowed with inlining disabled
COMPILATION_ERROR