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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2815093002: Correctly recognize non-constant enum children (issue 29306) (Closed)
Patch Set: Created 3 years, 8 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 | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index f5b2df67ad4136ad981f5d64e9dde6765e2ffdcc..7224413a7c40c45d66885a0f15af9ff624727525 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -4236,8 +4236,9 @@ class FieldElementImpl extends PropertyInducingElementImpl
}
@override
- bool get isEnumConstant =>
- enclosingElement != null ? enclosingElement.isEnum : false;
+ bool get isEnumConstant => enclosingElement != null
+ ? enclosingElement.isEnum && !isSynthetic
+ : false;
scheglov 2017/04/12 16:00:01 I think this could be "enclosingElement != null &&
Brian Wilkerson 2017/04/12 16:43:01 Done
@override
bool get isStatic {
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698