From 560226cc840c2dcf8fd849f6e412ac09223eee7c Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Thu, 2 Feb 2017 11:43:34 +0100 Subject: [PATCH] Use proper type for nullability check in 'calcTypeForIEEE754ArithmeticIfNeeded' --- .../backend/src/org/jetbrains/kotlin/codegen/codegenUtil.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/codegenUtil.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/codegenUtil.kt index 8b36c829db4..ea5a1347c82 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/codegenUtil.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/codegenUtil.kt @@ -288,10 +288,10 @@ fun calcTypeForIEEE754ArithmeticIfNeeded(expression: KtExpression?, bindingConte val stableTypes = bindingContext.getDataFlowInfoBefore(expression).getStableTypes(dataFlow) return stableTypes.firstNotNullResult { if (KotlinBuiltIns.isDoubleOrNullableDouble(it)) { - TypeAndNullability(Type.DOUBLE_TYPE, TypeUtils.isNullableType(ktType)) + TypeAndNullability(Type.DOUBLE_TYPE, TypeUtils.isNullableType(it)) } else if (KotlinBuiltIns.isFloatOrNullableFloat(it)) { - TypeAndNullability(Type.FLOAT_TYPE, TypeUtils.isNullableType(ktType)) + TypeAndNullability(Type.FLOAT_TYPE, TypeUtils.isNullableType(it)) } else { null