Files
kotlin-fork/compiler/testData/diagnostics/tests/when/kt9929.kt
T
Mikhail Zarechenskiy 100a6f70ca Relax rules about inferring to Nothing for special calls
#KT-37388 Fixed
 #KT-38427 Fixed
 #KT-39953 Fixed
 #KT-38899 Fixed
2020-07-16 09:56:46 +03:00

10 lines
178 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
val test: Int = if (true) <!NI;TYPE_MISMATCH!>{
when (2) {
1 -> 1
else -> <!OI;NULL_FOR_NONNULL_TYPE!>null<!>
}
}<!>
else {
2
}