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:
John Messerly 2016-06-07 14:03:34 -07:00
parent 995a19b26f
commit 61a2bb4fdc

View file

@ -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