Index: pkg/compiler/lib/src/parser/element_listener.dart |
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart |
index 6fe019cdae5ac31f2f075df7d495fc19a1d0c238..6d9bd8252a9f9045a0b83bd4c2544a3da0928e1b 100644 |
--- a/pkg/compiler/lib/src/parser/element_listener.dart |
+++ b/pkg/compiler/lib/src/parser/element_listener.dart |
@@ -17,6 +17,7 @@ import '../elements/modelx.dart' |
EnumClassElementX, |
FieldElementX, |
LibraryElementX, |
+ MetadataAnnotationX, |
NamedMixinApplicationElementX, |
VariableList; |
import '../id_generator.dart'; |
@@ -233,8 +234,8 @@ class ElementListener extends Listener { |
void endTopLevelDeclaration(Token token) { |
if (!metadata.isEmpty) { |
- recoverableError( |
- metadata.first.beginToken, 'Metadata not supported here.'); |
+ MetadataAnnotationX first = metadata.first; |
+ recoverableError(first.beginToken, 'Metadata not supported here.'); |
metadata.clear(); |
} |
} |