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

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

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Fixes after rebase. Created 3 years, 10 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
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 00b9ac7cda92327babbeae25613155c50fdab63b..ea0988801a0ce7419374745d05b2c2249ed04555 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
@@ -219,7 +219,8 @@ class NoSuchMethodRegistry {
}
if (expr is Send && expr.isTypeCast) {
Send sendExpr = expr;
- var typeName = sendExpr.typeAnnotationFromIsCheckOrCast.typeName;
+ var typeAnnotation = sendExpr.typeAnnotationFromIsCheckOrCast;
+ var typeName = typeAnnotation.asNominalTypeAnnotation()?.typeName;
if (typeName is Identifier && typeName.source == "dynamic") {
expr = sendExpr.receiver;
}

Powered by Google App Engine
This is Rietveld 408576698