FIR: extends scope of SENSELESS_COMPARISON
FE1.0 only reports SENSELESS_COMPARISON if one of the operand is `null`. This change makes FIR reports also in case one of the operand has type `Nothing?`. In addition, fix handling of type alias in ConeTypeContext#isNullableType
This commit is contained in:
committed by
teamcityserver
parent
c7272f6986
commit
263b876e6e
@@ -196,10 +196,10 @@ fun case_17(x: Boolean?, y: Boolean?) {
|
||||
true -> x!!
|
||||
false -> x!!
|
||||
null -> if (true) if (true) if (true) if (true) if (true) when (y) {
|
||||
true -> when (y) {
|
||||
<!SENSELESS_COMPARISON!>true<!> -> when (y) {
|
||||
else -> if (true) if (true) if (true) if (true) if (true) x!! else x!! else x!! else x!! else x!! else x!!
|
||||
}
|
||||
false -> x!!
|
||||
<!SENSELESS_COMPARISON!>false<!> -> x!!
|
||||
<!SENSELESS_NULL_IN_WHEN!>null<!> -> if (true) if (true) if (true) if (true) if (true) x!! else x!! else x!! else x!! else x!! else x!!
|
||||
} else x!! else x!! else x!! else x!! else x!!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user