| 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 b633360cb27610da7432724910bb1394b32d6a52..7139722670fb1009060c71c3f64ab3e3aec1f7c3 100644
|
| --- a/pkg/polymer/lib/src/build/script_compactor.dart
|
| +++ b/pkg/polymer/lib/src/build/script_compactor.dart
|
| @@ -506,20 +506,24 @@ class _HtmlExtractor extends TreeVisitor {
|
| tag == 'textarea' && name == 'value');
|
| }
|
| for (var exp in bindings.expressions) {
|
| - _addExpression(exp, isEvent, isTwoWay);
|
| + _addExpression(exp, isEvent, isTwoWay, node.sourceSpan);
|
| }
|
| });
|
| }
|
|
|
| - void _addExpression(String stringExpression, bool inEvent, bool isTwoWay) {
|
| + void _addExpression(String stringExpression, bool inEvent, bool isTwoWay,
|
| + SourceSpan span) {
|
| +
|
| if (inEvent) {
|
| - if (!stringExpression.startsWith("@")) {
|
| - if (stringExpression == '') return;
|
| - generator.addGetter(stringExpression);
|
| - generator.addSymbol(stringExpression);
|
| + if (stringExpression.startsWith('@')) {
|
| + logger.warning('event bindings with @ are no longer supported',
|
| + span: span);
|
| return;
|
| }
|
| - stringExpression = stringExpression.substring(1);
|
| +
|
| + if (stringExpression == '') return;
|
| + generator.addGetter(stringExpression);
|
| + generator.addSymbol(stringExpression);
|
| }
|
| visitor.run(pe.parse(stringExpression), isTwoWay);
|
| }
|
| @@ -701,7 +705,7 @@ List<ClassElement> _visibleClassesOf(LibraryElement lib) {
|
|
|
| /// Retrieves all top-level methods that are visible if you were to import
|
| /// [lib]. This includes exported methods from other libraries too.
|
| -List<ClassElement> _visibleTopLevelMethodsOf(LibraryElement lib) {
|
| +List<FunctionElement> _visibleTopLevelMethodsOf(LibraryElement lib) {
|
| var result = [];
|
| result.addAll(lib.units.expand((u) => u.functions));
|
| for (var e in lib.exports) {
|
|
|