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

Unified Diff: runtime/vm/parser.cc

Issue 1027383004: Evaluate expression before NSM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | tests/language/regress_22936_test.dart » ('j') | 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 44689)
+++ runtime/vm/parser.cc (working copy)
@@ -10327,15 +10327,18 @@
if (name.IsNull()) {
ReportError(left_pos, "expression is not assignable");
}
- result = ThrowNoSuchMethodError(
- original->token_pos(),
- *target_cls,
- String::Handle(Z, Field::SetterName(name)),
- NULL, // No arguments.
- InvocationMirror::kStatic,
- original->IsLoadLocalNode() ?
- InvocationMirror::kLocalVar : InvocationMirror::kSetter,
- NULL); // No existing function.
+ LetNode* let_node = new(Z) LetNode(left_pos);
+ let_node->AddInitializer(rhs);
+ let_node->AddNode(ThrowNoSuchMethodError(
+ original->token_pos(),
+ *target_cls,
+ String::Handle(Z, Field::SetterName(name)),
+ NULL, // No arguments.
+ InvocationMirror::kStatic,
+ original->IsLoadLocalNode() ?
+ InvocationMirror::kLocalVar : InvocationMirror::kSetter,
+ NULL)); // No existing function.
+ result = let_node;
} else if (result->IsStoreIndexedNode() ||
result->IsInstanceSetterNode() ||
result->IsStaticSetterNode() ||
« no previous file with comments | « no previous file | tests/language/regress_22936_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698