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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1081873005: Visit arguments of invalid TypeLiteralSends during inference (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index d8368c306bf72fef2e569381d28e78affa01432d..851cde8ace5ec26d4966b8755be4647c2645396d 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1031,6 +1031,18 @@ class SimpleTypeInferrerVisitor<T>
node, new Selector.fromElement(element), element, arguments);
}
+ @override
+ T visitTypeLiteralSend(ast.Send node) {
+ if (node.isCall) {
Siggi Cherem (dart-lang) 2015/04/21 02:21:19 I added this because it seems that the ssa/builder
Johnni Winther 2015/04/21 08:15:13 The fix is good. This needs to happen at runtime s
+ // This is reached when users forget to put a `new` in front of a type
+ // literal. The emitter will generate an actual call (even though it is
+ // likely invalid), and for that it needs to have the arguments processed
+ // as well.
+ analyzeArguments(node.arguments);
+ }
+ return super.visitTypeLiteralSend(node);
+ }
+
T visitStaticSend(ast.Send node) {
Element element = elements[node];
assert(!elements.isAssert(node));
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/23264_test.dart » ('j') | tests/compiler/dart2js_extra/23264_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698