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

Unified Diff: pkg/polymer_expressions/lib/eval.dart

Issue 213713002: Reapply change that makes path-observer more agressive with property lookups. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/observe/test/path_observer_test.dart ('k') | pkg/smoke/lib/mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer_expressions/lib/eval.dart
diff --git a/pkg/polymer_expressions/lib/eval.dart b/pkg/polymer_expressions/lib/eval.dart
index 298318347762032e9d774b0362607dffdef2d198..2332cf908f6f276aea268197cba996be800abaa3 100644
--- a/pkg/polymer_expressions/lib/eval.dart
+++ b/pkg/polymer_expressions/lib/eval.dart
@@ -150,7 +150,7 @@ void assign(Expression expr, Object value, Scope scope) {
* searches for the name in local variables, then in global variables,
* and then finally looks up the name as a property in the model.
*/
-abstract class Scope {
+abstract class Scope implements Indexable<String, Object> {
Scope._();
/** Create a scope containing a [model] and all of [variables]. */
@@ -168,7 +168,11 @@ abstract class Scope {
* we return the [model]. For any other name, this finds the first variable
* matching [name] or, if none exists, the property [name] in the [model].
*/
- Object operator[](String name);
+ Object operator [](String name);
+
+ operator []=(String name, Object value) {
+ throw new UnsupportedError('[]= is not supported in Scope.');
+ }
/**
* Returns whether [name] is defined in [model], that is, a lookup
« no previous file with comments | « pkg/observe/test/path_observer_test.dart ('k') | pkg/smoke/lib/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698