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

Unified Diff: pkg/polymer/lib/src/build/script_compactor.dart

Issue 226393003: Correctly generate code when using transformers in polymer-expressions. (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 | « no previous file | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/script_compactor.dart
diff --git a/pkg/polymer/lib/src/build/script_compactor.dart b/pkg/polymer/lib/src/build/script_compactor.dart
index 6a9fc420eb6e9258a69428a3f90f5960068a2f4d..40546489798e9fed789df9b58a58477c70a77e2e 100644
--- a/pkg/polymer/lib/src/build/script_compactor.dart
+++ b/pkg/polymer/lib/src/build/script_compactor.dart
@@ -529,8 +529,11 @@ class _SubExpressionVisitor extends pe.RecursiveVisitor {
void preVisitExpression(e) {
// For two-way bindings the outermost expression may be updated, so we need
- // both the getter and the setter, but subexpressions only need the getter.
- // So we exclude setters as soon as we go deeper in the tree.
+ // both the getter and the setter, but we only need the getter for
+ // subexpressions. We exclude setters as soon as we go deeper in the tree,
+ // except when we see a filter (that can potentially be a two-way
+ // transformer).
+ if (e is pe.BinaryOperator && e.operator == '|') return;
_includeSetter = false;
}
« no previous file with comments | « no previous file | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698