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

Unified Diff: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart

Issue 2009773004: Remove reference to compiler from libary loader, fix analyzer warning (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index 678f805a9edb0f35a0afd589d6bf3a765fe33225..4cbc011d7dfe48394a5830a0cd8db570f9fc4a5c 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -206,11 +206,12 @@ class NoSuchMethodRegistry {
expr = stmt.expression;
}
}
- if (expr is Send &&
- expr.isTypeCast &&
- expr.typeAnnotationFromIsCheckOrCast.typeName is Identifier &&
- expr.typeAnnotationFromIsCheckOrCast.typeName.source == "dynamic") {
- expr = (expr as Send).receiver;
+ if (expr is Send && expr.isTypeCast) {
+ Send sendExpr = expr;
+ var typeName = sendExpr.typeAnnotationFromIsCheckOrCast.typeName;
+ if (typeName is Identifier && typeName.source == "dynamic") {
+ expr = sendExpr.receiver;
+ }
}
if (expr is Send &&
expr.isSuperCall &&
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698