| Index: lib/src/info.dart
|
| diff --git a/lib/src/info.dart b/lib/src/info.dart
|
| index 295028d01a3d18d56126e2092456f85d0fdc2f5e..c48fb361141ed613cf52708daabc374962ad5b42 100644
|
| --- a/lib/src/info.dart
|
| +++ b/lib/src/info.dart
|
| @@ -222,15 +222,8 @@ abstract class DownCast extends CoercionInfo {
|
|
|
| // Handle null call specially.
|
| if (expression is NullLiteral) {
|
| - if (rules.isNonNullableType(toT)) {
|
| - reason = "null is invalid as a $toT";
|
| - return new StaticTypeError(rules, expression, toT, reason: reason);
|
| - } else {
|
| - // We should only get here if some coercion is required.
|
| - assert(rules.maybeNonNullableType(toT));
|
| - // TODO(vsm): Create a NullCast for this once we revisit nonnullability.
|
| - return new DownCastImplicit(rules, expression, cast);
|
| - }
|
| + // TODO(vsm): Create a NullCast for this once we revisit nonnullability.
|
| + return new DownCastImplicit(rules, expression, cast);
|
| }
|
|
|
| // Inference "casts":
|
|
|