Skip to content

Commit

Permalink
fix(StaticMetadataExtractor): Map members annotations to all annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Apr 21, 2014
1 parent 90f7582 commit ab41791
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/tools/transformer/metadata_extractor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,11 @@ class AnnotationExtractor {
annotation.parent.element);
return false;
}
return element.enclosingElement.type.isAssignableTo(directiveType.type) ||
element.enclosingElement.type.isAssignableTo(formatterType.type);

enclosingType = element.enclosingElement.type;

return enclosingType.isAssignableTo(directiveType.type) ||
enclosingType.isAssignableTo(formatterType.type);
}).toList();

if (type.annotations.isEmpty) return null;
Expand Down Expand Up @@ -359,7 +362,7 @@ class AnnotationExtractor {
var map = new MapLiteral(null, null, null, [], null);
var label = new Label(new SimpleIdentifier(
new _GeneratedToken(TokenType.STRING, 'map')),
new _GeneratedToken(TokenType.COLON, ':'));
new _GeneratedToken(TokenType.COLON, ':'));
mapArg = new NamedExpression(label, map);
annotation.arguments.arguments.add(mapArg);
}
Expand Down

0 comments on commit ab41791

Please sign in to comment.