[Tests] Add missing diagnostics handler to irText tests
Merge-request: KT-MR-11721 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
ccfbb5f77a
commit
90904e4f8a
@@ -2,6 +2,7 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
// DIAGNOSTICS: -BREAK_OR_CONTINUE_OUTSIDE_A_LOOP -NOT_A_LOOP_LABEL -UNRESOLVED_REFERENCE -BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY
|
||||
|
||||
fun test1() {
|
||||
break
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !IGNORE_ERRORS
|
||||
// DIAGNOSTICS: -NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER -BREAK_OR_CONTINUE_OUTSIDE_A_LOOP -UNEXPECTED_TRAILING_LAMBDA_ON_A_NEW_LINE -NO_VALUE_FOR_PARAMETER -NOT_A_LOOP_LABEL -UNRESOLVED_REFERENCE -TYPE_MISMATCH -BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY
|
||||
// WITH_STDLIB
|
||||
|
||||
inline fun foo(block: () -> Unit) { block() }
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
fun test1(c: Boolean?) {
|
||||
L@ while (true) {
|
||||
L2@while (c ?: break)
|
||||
L2@while (c ?: break) ;
|
||||
}
|
||||
}
|
||||
|
||||
fun test2(c: Boolean?) {
|
||||
L@ while (true) {
|
||||
L2@while (c ?: continue)
|
||||
L2@while (c ?: continue) ;
|
||||
}
|
||||
}
|
||||
|
||||
fun test3(ss: List<String>?) {
|
||||
L@ while (true) {
|
||||
L2@for (s in ss ?: continue)
|
||||
L2@for (s in ss ?: continue) ;
|
||||
}
|
||||
}
|
||||
|
||||
fun test4(ss: List<String>?) {
|
||||
L@ while (true) {
|
||||
L2@for (s in ss ?: break)
|
||||
L2@for (s in ss ?: break) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user