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

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

Issue 2329483003: Keep only InterfaceType(s) in resynthesized lists of interfaces and mixins. (Closed)
Patch Set: Created 4 years, 3 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/summary/resynthesize_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 820a132f4dd188683e1ae12fb7864224d3b777c8..a3bf6b4e7c1b93122b635c11b0401c395eed275c 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -743,6 +743,7 @@ class ClassElementImpl extends AbstractClassElementImpl
ResynthesizerContext context = enclosingUnit.resynthesizerContext;
_interfaces = _unlinkedClass.interfaces
.map((EntityRef t) => context.resolveTypeRef(t, this))
+ .where((DartType type) => type is InterfaceType)
.toList(growable: false);
}
return _interfaces ?? const <InterfaceType>[];
@@ -849,6 +850,7 @@ class ClassElementImpl extends AbstractClassElementImpl
ResynthesizerContext context = enclosingUnit.resynthesizerContext;
_mixins = _unlinkedClass.mixins
.map((EntityRef t) => context.resolveTypeRef(t, this))
+ .where((DartType type) => type is InterfaceType)
.toList(growable: false);
}
return _mixins ?? const <InterfaceType>[];
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698