Index: pkg/compiler/lib/src/resolution/resolution_strategy.dart |
diff --git a/pkg/compiler/lib/src/resolution/resolution_strategy.dart b/pkg/compiler/lib/src/resolution/resolution_strategy.dart |
index 4c23914b1104b4d34544c835cec9082054cdfb43..2eb93c6266de0b0d93fc2d0a3121f13ef22d14e5 100644 |
--- a/pkg/compiler/lib/src/resolution/resolution_strategy.dart |
+++ b/pkg/compiler/lib/src/resolution/resolution_strategy.dart |
@@ -10,8 +10,8 @@ import '../common/backend_api.dart'; |
import '../common/names.dart'; |
import '../common/resolution.dart'; |
import '../common/tasks.dart'; |
-import '../constants/values.dart'; |
import '../compiler.dart'; |
+import '../constants/values.dart'; |
import '../elements/elements.dart'; |
import '../elements/entities.dart'; |
import '../elements/modelx.dart'; |
@@ -425,6 +425,22 @@ class _CompilerElementEnvironment implements ElementEnvironment { |
type.computeUnaliased(_resolution); |
return type.unaliased; |
} |
+ |
+ @override |
+ Iterable<ConstantValue> getMemberMetadata(MemberElement element) { |
+ List<ConstantValue> values = <ConstantValue>[]; |
+ _compiler.reporter.withCurrentElement(element, () { |
+ for (MetadataAnnotation metadata in element.implementation.metadata) { |
+ metadata.ensureResolved(_compiler.resolution); |
+ assert(invariant(metadata, metadata.constant != null, |
+ message: "Unevaluated metadata constant.")); |
+ ConstantValue value = |
+ _compiler.constants.getConstantValue(metadata.constant); |
+ values.add(value); |
+ } |
+ }); |
+ return values; |
+ } |
} |
/// AST-based logic for processing annotations. These annotations are processed |