diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart index 1b27d2ca69d..76eb335fc50 100644 --- a/pkg/compiler/lib/src/ssa/nodes.dart +++ b/pkg/compiler/lib/src/ssa/nodes.dart @@ -4344,6 +4344,8 @@ AbstractBool _typeTest( if (expressionIsNull.isPotentiallyTrue) { if (dartType.isObject) return AbstractBool.Maybe; } + } else if (expressionIsNull.isDefinitelyTrue && _nullIs(dartType)) { + return AbstractBool.True; } if (checkedAbstractValue.isPrecise &&