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

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

Issue 2009853003: accept null type casts in dummy noSuchMethod checks (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 | « no previous file | tests/compiler/dart2js/no_such_method_enabled_test.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 4bc53840c9c0513f130397c9ef55ac88305f63a5..bc57616870e054bebb40dad00c2c7b24b2f4b8a1 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
@@ -207,6 +207,11 @@ class NoSuchMethodRegistry {
}
}
if (expr is Send &&
+ expr.isTypeCast &&
+ expr.typeAnnotationFromIsCheckOrCast.typeName.source == "dynamic") {
+ expr = expr.receiver;
+ }
+ if (expr is Send &&
expr.isSuperCall &&
expr.selector is Identifier &&
(expr.selector as Identifier).source == Identifiers.noSuchMethod_) {
« no previous file with comments | « no previous file | tests/compiler/dart2js/no_such_method_enabled_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698