Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/kt4310.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

12 lines
241 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
package f
fun test(a: Boolean, b: Boolean): Int {
return if(a) {
1
} else <!NI;TYPE_MISMATCH!>{
<!OI;TYPE_MISMATCH!><!INVALID_IF_AS_EXPRESSION!>if<!> (b) {
3
}<!>
}<!>
}