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

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2655243007: Fix for invalid 'extends/implements/with SomeEnum'. (Closed)
Patch Set: Created 3 years, 11 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
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 67c5149995836fc7f1a3150fcd2d7f90422406d1..96eca0fae0adfe9ae88dbfa898cd322db79cd636 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -539,6 +539,9 @@ class ClassElementForLink_Class extends ClassElementForLink
_unlinkedClass.interfaces.map(_computeInterfaceType).toList();
@override
+ bool get isEnum => false;
+
+ @override
bool get isMixinApplication => _unlinkedClass.isMixinApplication;
@override
@@ -668,7 +671,7 @@ class ClassElementForLink_Class extends ClassElementForLink
InterfaceType _computeInterfaceType(EntityRef typeRef) {
if (typeRef != null) {
DartType type = enclosingElement.resolveTypeRef(typeRef, this);
- if (type is InterfaceType) {
+ if (type is InterfaceType && !type.element.isEnum) {
Brian Wilkerson 2017/01/28 17:18:39 Then it could be used here.
return type;
}
// In the event that the `typeRef` isn't an interface type (which may
@@ -732,6 +735,9 @@ class ClassElementForLink_Enum extends ClassElementForLink
List<InterfaceType> get interfaces => const [];
@override
+ bool get isEnum => true;
+
+ @override
bool get isObject => false;
@override

Powered by Google App Engine
This is Rietveld 408576698