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

Unified Diff: dart/lib/compiler/implementation/resolver.dart

Issue 10880026: Record literal list type arguments and report errors when there are too many. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated dart2dart status Created 8 years, 4 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 | dart/lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/resolver.dart
diff --git a/dart/lib/compiler/implementation/resolver.dart b/dart/lib/compiler/implementation/resolver.dart
index 736f4837653336939231b6185a5fb73c18e7afb0..78671592a0c25d0c550ff827934e98d95efa1690 100644
--- a/dart/lib/compiler/implementation/resolver.dart
+++ b/dart/lib/compiler/implementation/resolver.dart
@@ -1560,6 +1560,19 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
}
visitLiteralList(LiteralList node) {
+ NodeList arguments = node.typeArguments;
+ if (arguments !== null) {
+ Link<Node> nodes = arguments.nodes;
+ if (nodes.isEmpty()) {
+ error(arguments, MessageKind.MISSING_TYPE_ARGUMENT, []);
+ } else {
+ resolveTypeRequired(nodes.head);
+ for (nodes = nodes.tail; !nodes.isEmpty(); nodes = nodes.tail) {
+ error(nodes.head, MessageKind.ADDITIONAL_TYPE_ARGUMENT, []);
+ resolveTypeRequired(nodes.head);
+ }
+ }
+ }
visit(node.elements);
}
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698