Added dianostic error for non-local return on disabled inlines,
Render bytecode diagnostics in BytecodeToolWindow #KT-5584 Fixed
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user