From 04b6c48ae78030e26f9a6a8867a9da1db9263513 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 29 Aug 2019 11:21:49 +0300 Subject: [PATCH] [FIR] Disable smartcasts to Nothing? --- .../kotlin/fir/resolve/dfa/FirDataFlowAnalyzerImpl.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzerImpl.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzerImpl.kt index 8871ec40f44..876d229de86 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzerImpl.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzerImpl.kt @@ -288,13 +288,17 @@ class FirDataFlowAnalyzerImpl(transformer: FirBodyResolveTransformer) : FirDataF operandVariable, FirDataFlowInfo(setOf(session.builtinTypes.anyType.coneTypeUnsafe()), emptySet()) ) - ).addNotApprovedFact( + ) + // TODO: design do we need casts to Nothing? + /* + flow = addNotApprovedFact( expressionVariable, UnapprovedFirDataFlowInfo( eq(conditionValue.invert()!!), operandVariable, FirDataFlowInfo(setOf(session.builtinTypes.nullableNothingType.coneTypeUnsafe()), emptySet()) ) ) + */ } node.flow = flow