KT-16437 Incorrect type inference for some when coerced to Unit
If the result of 'when' is not used in an expression, this 'when' expression has type 'Unit' despite of whatever FE has inferred.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo(x: Int) {
|
||||
when (x) {
|
||||
0 -> 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user