[FIR] Implement checker for exhaustive when's in expression position
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user