JVM_IR: Implement some BE diagnostics
TODO proper diagnostics tests with BE diagnostics
This commit is contained in:
+6
-3
@@ -1,14 +1,17 @@
|
||||
inline fun a(l: () -> Unit) {
|
||||
b(l)
|
||||
inline fun a(q: () -> Unit) {
|
||||
b(q)
|
||||
|
||||
//check that nested not recognized as cycle
|
||||
// check that nested not recognized as cycle
|
||||
c {
|
||||
c {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
withDefaults()
|
||||
}
|
||||
|
||||
inline fun withDefaults(x: Int = 1) = x * 2
|
||||
|
||||
inline fun b(p: () -> Unit) {
|
||||
p()
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
compiler/testData/cli/jvm/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle
|
||||
b(l)
|
||||
b(q)
|
||||
^
|
||||
compiler/testData/cli/jvm/inlineCycle.kt:15:5: error: the 'a' invocation is a part of inline cycle
|
||||
compiler/testData/cli/jvm/inlineCycle.kt:18:5: error: the 'a' invocation is a part of inline cycle
|
||||
a(p)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/inlineCycle.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-ir
|
||||
@@ -0,0 +1,7 @@
|
||||
compiler/testData/cli/jvm/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle
|
||||
b(q)
|
||||
^
|
||||
compiler/testData/cli/jvm/inlineCycle.kt:18:5: error: the 'a' invocation is a part of inline cycle
|
||||
a(p)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
@@ -0,0 +1,5 @@
|
||||
$TESTDATA_DIR$/nonLocalDisabled.kt
|
||||
-Xno-inline
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xuse-ir
|
||||
@@ -0,0 +1,7 @@
|
||||
compiler/testData/cli/jvm/nonLocalDisabled.kt:3:9: error: non-local returns are not allowed with inlining disabled
|
||||
return
|
||||
^
|
||||
compiler/testData/cli/jvm/nonLocalDisabled.kt:7:9: error: non-local returns are not allowed with inlining disabled
|
||||
return@a
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user