Use proper type for nullability check in 'calcTypeForIEEE754ArithmeticIfNeeded'
This commit is contained in:
@@ -288,10 +288,10 @@ fun calcTypeForIEEE754ArithmeticIfNeeded(expression: KtExpression?, bindingConte
|
|||||||
val stableTypes = bindingContext.getDataFlowInfoBefore(expression).getStableTypes(dataFlow)
|
val stableTypes = bindingContext.getDataFlowInfoBefore(expression).getStableTypes(dataFlow)
|
||||||
return stableTypes.firstNotNullResult {
|
return stableTypes.firstNotNullResult {
|
||||||
if (KotlinBuiltIns.isDoubleOrNullableDouble(it)) {
|
if (KotlinBuiltIns.isDoubleOrNullableDouble(it)) {
|
||||||
TypeAndNullability(Type.DOUBLE_TYPE, TypeUtils.isNullableType(ktType))
|
TypeAndNullability(Type.DOUBLE_TYPE, TypeUtils.isNullableType(it))
|
||||||
}
|
}
|
||||||
else if (KotlinBuiltIns.isFloatOrNullableFloat(it)) {
|
else if (KotlinBuiltIns.isFloatOrNullableFloat(it)) {
|
||||||
TypeAndNullability(Type.FLOAT_TYPE, TypeUtils.isNullableType(ktType))
|
TypeAndNullability(Type.FLOAT_TYPE, TypeUtils.isNullableType(it))
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
null
|
null
|
||||||
|
|||||||
Reference in New Issue
Block a user