[FIR] Forbid no then branch in if expression

#KT-59883
This commit is contained in:
Evgeniy.Zhelenskiy
2024-02-08 23:31:10 +01:00
committed by Space Team
parent 3d6af53a3b
commit 2e66954d01
3 changed files with 19 additions and 3 deletions
@@ -2,7 +2,7 @@
fun example() {
val a = if (true) true else false
val b = if (true) else false
val b = <!INVALID_IF_AS_EXPRESSION!>if<!> (true) else false
val c = <!INVALID_IF_AS_EXPRESSION!>if<!> (true) true
val d = <!INVALID_IF_AS_EXPRESSION!>if<!> (true) true else;
val e = if (true) {} else false