@@ -2,11 +2,8 @@ library angular2.transform.template_compiler.directive_metadata_reader;
22
33import 'package:analyzer/analyzer.dart' ;
44import 'package:angular2/src/render/api.dart' ;
5- import 'package:angular2/src/transform/common/asset_reader.dart' ;
65import 'package:angular2/src/transform/common/logging.dart' ;
7- import 'package:angular2/src/transform/common/names.dart' ;
86import 'package:angular2/src/transform/common/parser.dart' ;
9- import 'package:angular2/src/transform/common/property_utils.dart' as prop;
107
118/// Reads [DirectiveMetadata] from the `attributes` of `t` .
129List <DirectiveMetadata > readDirectiveMetadata (RegisteredType t) {
@@ -102,20 +99,20 @@ class _DirectiveMetadataVisitor extends Object
10299 logger.error (
103100 'Angular 2 currently only supports boolean literal values for '
104101 'Decorator#compileChildren.'
105- ' Source: ${node }' );
102+ ' Source: ${compileChildrenValue }' );
106103 return ;
107104 }
108- current.compileChildren = compileChildrenValue.value;
105+ current.compileChildren = ( compileChildrenValue as BooleanLiteral ) .value;
109106 }
110107
111108 void _populateProperties (Expression propertiesValue) {
112109 if (propertiesValue is ! MapLiteral ) {
113110 logger.error ('Angular 2 currently only supports map literal values for '
114111 'Directive#properties.'
115- ' Source: ${node }' );
112+ ' Source: ${propertiesValue }' );
116113 return ;
117114 }
118- for (MapLiteralEntry entry in propertiesValue.entries) {
115+ for (MapLiteralEntry entry in ( propertiesValue as MapLiteral ) .entries) {
119116 var sKey = _expressionToString (entry.key, 'Directive#properties keys' );
120117 var sVal = _expressionToString (entry.value, 'Direcive#properties values' );
121118 current.properties[sKey] = sVal;
@@ -126,10 +123,10 @@ class _DirectiveMetadataVisitor extends Object
126123 if (hostListenersValue is ! MapLiteral ) {
127124 logger.error ('Angular 2 currently only supports map literal values for '
128125 'Directive#hostListeners.'
129- ' Source: ${node }' );
126+ ' Source: ${hostListenersValue }' );
130127 return ;
131128 }
132- for (MapLiteralEntry entry in hostListenersValue.entries) {
129+ for (MapLiteralEntry entry in ( hostListenersValue as MapLiteral ) .entries) {
133130 var sKey = _expressionToString (entry.key, 'Directive#hostListeners keys' );
134131 var sVal =
135132 _expressionToString (entry.value, 'Directive#hostListeners values' );
0 commit comments