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

Unified Diff: frog/minfrog

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 | « frog/member.dart ('k') | tests/language/src/Constructor3NegativeTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/minfrog
===================================================================
--- frog/minfrog (revision 2524)
+++ frog/minfrog (working copy)
@@ -5595,7 +5595,7 @@
}
if (arg == null || !this.parameters.$index(i).get$isOptional()) {
var msg = MethodMember._argCountMsg(Math.min(i, args.get$length()), i + 1, true);
- return this._argError(context, node, target, args, msg, args.nodes.$index(i).get$span());
+ return this._argError(context, node, target, args, msg, (i >= args.nodes.get$length()) ? node.span : args.nodes.$index(i).get$span());
}
else {
argsCode.add$1(this.isConst && arg.get$isConst() ? arg.get$canonicalCode() : arg.get$code());
« no previous file with comments | « frog/member.dart ('k') | tests/language/src/Constructor3NegativeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698