[FIR] Update testdata of FIR spec tests

This commit is contained in:
Dmitriy Novozhilov
2021-02-06 12:48:46 +03:00
parent 18bde2c542
commit d7e3e83251
27 changed files with 169 additions and 252 deletions
@@ -1,11 +1,20 @@
/*
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (NEGATIVE)
*
* SECTIONS: coercion-to-unit
* NUMBER: 1
* DESCRIPTION: Coercion to Unit error diagnostics absence
* ISSUES: KT-38490
*/
// TESTCASE NUMBER: 1
val y0 = when (2) {
else -> if (true) {""}
else -> <!INVALID_IF_AS_EXPRESSION!>if<!> (true) {""}
}
val w:Any = TODO()
val y1 = when (2) {
else -> if (true) {""} // false ok with coercion to Unit
else -> <!INVALID_IF_AS_EXPRESSION!>if<!> (true) {""} // false ok with coercion to Unit
}