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 && |