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

Unified Diff: frog/member.dart

Issue 8966026: When generating the error message, don't overrun args.nodes . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | frog/minfrog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/member.dart
===================================================================
--- frog/member.dart (revision 2524)
+++ frog/member.dart (working copy)
@@ -959,7 +959,7 @@
if (arg == null || !parameters[i].isOptional) {
var msg = _argCountMsg(Math.min(i, args.length), i + 1, atLeast:true);
return _argError(context, node, target, args, msg,
- args.nodes[i].span);
+ (i >= args.nodes.length) ? node.span : args.nodes[i].span);
} else {
argsCode.add(isConst && arg.isConst
? arg.canonicalCode : arg.code);
« no previous file with comments | « no previous file | frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698