4a7b4d655c
Full completion should not be done if lower `Nothing` is the only proper constraint when constraint with ILT type is present. ILT will be selected as a resulting type and transformed into `Int` without attention to possible restrictions from outer calls.
45 lines
745 B
Kotlin
Vendored
45 lines
745 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
|
|
|
fun test(boolean: Boolean) {
|
|
val expectedLong: Long = if (boolean) {
|
|
if (boolean) {
|
|
42
|
|
} else {
|
|
return
|
|
}
|
|
} else {
|
|
return
|
|
}
|
|
|
|
val expectedInt: Int = if (boolean) {
|
|
if (boolean) {
|
|
42
|
|
} else {
|
|
return
|
|
}
|
|
} else {
|
|
return
|
|
}
|
|
|
|
val expectedShort: Short = if (boolean) {
|
|
if (boolean) {
|
|
42
|
|
} else {
|
|
return
|
|
}
|
|
} else {
|
|
return
|
|
}
|
|
|
|
val expectedByte: Byte = if (boolean) {
|
|
if (boolean) {
|
|
42
|
|
} else {
|
|
return
|
|
}
|
|
} else {
|
|
return
|
|
}
|
|
}
|