Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Unified Diff: pkg/analyzer/lib/src/task/strong/info.dart

Issue 2050443002: Remove dead code in strong mode's warnings for null literals (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/info.dart
diff --git a/pkg/analyzer/lib/src/task/strong/info.dart b/pkg/analyzer/lib/src/task/strong/info.dart
index 408c05dae2033756d6231e3a1cf1a6b0b6f46bab..ec8626fd7e1ff93e6ffd2d8ff6c85277a6bb167f 100644
--- a/pkg/analyzer/lib/src/task/strong/info.dart
+++ b/pkg/analyzer/lib/src/task/strong/info.dart
@@ -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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698