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

Unified Diff: runtime/vm/parser.cc

Issue 177633008: Better error message for assignment to final local variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
« runtime/lib/errors_patch.dart ('K') | « runtime/lib/invocation_mirror_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 32974)
+++ runtime/vm/parser.cc (working copy)
@@ -7872,13 +7872,15 @@
if (name.IsNull()) {
ErrorMsg(left_pos, "expression is not assignable");
}
- result = ThrowNoSuchMethodError(original->token_pos(),
- *target_cls,
- name,
- NULL, // No arguments.
- InvocationMirror::kStatic,
- InvocationMirror::kSetter,
- NULL); // No existing function.
+ result = ThrowNoSuchMethodError(
+ original->token_pos(),
Ivan Posva 2014/02/25 07:10:07 Bad indentation.
hausner 2014/02/25 18:47:05 Moved parameters to the left. I find it unreadable
+ *target_cls,
+ name,
+ NULL, // No arguments.
+ InvocationMirror::kStatic,
+ original->IsLoadLocalNode() ?
+ InvocationMirror::kLocalVar : InvocationMirror::kSetter,
+ NULL); // No existing function.
} else if (result->IsStoreIndexedNode() ||
result->IsInstanceSetterNode() ||
result->IsStaticSetterNode() ||
« runtime/lib/errors_patch.dart ('K') | « runtime/lib/invocation_mirror_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698