[Spec tests] Updating tests for kotlin 1.4.0
This commit is contained in:
committed by
Victor Petukhov
parent
ab3b63c92a
commit
1caafdc9d4
+4
-4
@@ -1,11 +1,11 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-201
|
||||
* PLACE: expressions, when-expression -> paragraph 6 -> sentence 11
|
||||
* NUMBER: 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: 'When' with bound value and not allowed break and continue expression (without labels) in 'when condition'.
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
fun case_1(value_1: Int): String {
|
||||
while (true) {
|
||||
when (value_1) {
|
||||
<!BREAK_OR_CONTINUE_IN_WHEN!>break<!><!UNREACHABLE_CODE!><!> -> <!UNREACHABLE_CODE!>return ""<!>
|
||||
break<!UNREACHABLE_CODE!><!> -> <!UNREACHABLE_CODE!>return ""<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ fun case_1(value_1: Int): String {
|
||||
fun case_2(value_1: Int): String {
|
||||
while (true) {
|
||||
when (value_1) {
|
||||
<!BREAK_OR_CONTINUE_IN_WHEN!>continue<!><!UNREACHABLE_CODE!><!> -> <!UNREACHABLE_CODE!>return ""<!>
|
||||
continue<!UNREACHABLE_CODE!><!> -> <!UNREACHABLE_CODE!>return ""<!>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user