Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: pkg/dev_compiler/lib/src/compiler/element_helpers.dart

Issue 2458693003: fix #27672, call computeConstantValue for metadata (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/element_helpers.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/element_helpers.dart b/pkg/dev_compiler/lib/src/compiler/element_helpers.dart
index 053227dfa8719f607e3946095dd487d67b9d467a..7f4576d9252639a15a2f5da7710b222de5b6a41c 100644
--- a/pkg/dev_compiler/lib/src/compiler/element_helpers.dart
+++ b/pkg/dev_compiler/lib/src/compiler/element_helpers.dart
@@ -51,7 +51,7 @@ class Tuple2<T0, T1> {
///
DartObject findAnnotation(Element element, bool test(DartObjectImpl value)) {
for (var metadata in element.metadata) {
- var value = metadata.constantValue;
+ var value = metadata.computeConstantValue();
if (value != null && test(value)) return value;
}
return null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698