mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[dart2js] Remove as checks where the expression is known to be null and the cast type is nullable.
Change-Id: I3f17a581d77bf4cfda90cf931c4bbdf0a53d0929 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286681 Commit-Queue: Nate Biggs <natebiggs@google.com> Reviewed-by: Stephen Adams <sra@google.com>
This commit is contained in:
parent
c19720245c
commit
624fc6a9d6
|
@ -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 &&
|
||||
|
|
Loading…
Reference in a new issue