mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:07:06 +00:00
Remove dead code in strong mode's warnings for null literals
This code should no longer be reachable. I think it was part of our early non-null primitive type experimentation. (Currently `null` literal is treated as bottom, so it should never be a downcast if casting from null.) R=leafp@google.com Review URL: https://codereview.chromium.org/2050443002 .
This commit is contained in:
parent
995a19b26f
commit
61a2bb4fdc
|
@ -92,12 +92,6 @@ abstract class DownCast extends CoercionInfo {
|
|||
// types, but the function type is not assignable to the class
|
||||
assert(toType.isSubtypeOf(fromType) || fromType.isAssignableTo(toType));
|
||||
|
||||
// Handle null call specially.
|
||||
if (expression is NullLiteral) {
|
||||
// TODO(vsm): Create a NullCast for this once we revisit nonnullability.
|
||||
return new DownCastImplicit(rules, expression, fromType, toType);
|
||||
}
|
||||
|
||||
// Inference "casts":
|
||||
if (expression is Literal || expression is FunctionExpression) {
|
||||
// fromT should be an exact type - this will almost certainly fail at
|
||||
|
|
Loading…
Reference in a new issue