[FIR] Implement checker for exhaustive when's in expression position

This commit is contained in:
Dmitriy Novozhilov
2021-02-04 15:41:57 +03:00
parent 3f715e671d
commit 8dd9d98129
103 changed files with 919 additions and 617 deletions
@@ -9,7 +9,7 @@ sealed class Tree {
is Node -> this.left.max()
}
fun maxIsClass(): Int = when(this) {
fun maxIsClass(): Int = <!NO_ELSE_IN_WHEN!>when<!>(this) {
Empty -> -1
Leaf -> 0
is Node -> this.left.max()
@@ -20,4 +20,4 @@ sealed class Tree {
is Node -> this.left.max()
else -> -1
}
}
}