Skip to content

Commit 2a97d3c

Browse files
authored
Exclude InterfaceType. Hacky. (#2575)
1 parent bc7bc67 commit 2a97d3c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/src/element_type.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ abstract class ElementType extends Privacy {
3434
} else {
3535
var element = ModelElement.fromElement(f.element, packageGraph);
3636
assert(f is ParameterizedType || f is TypeParameterType);
37-
var isGenericTypeAlias = f.aliasElement != null;
37+
// TODO(jcollins-g): after analyzer 1.2.0 implement InterfaceType
38+
// alias references and strip out all the cruft that's accumulated
39+
// here for non-generic type aliases.
40+
var isGenericTypeAlias = f.aliasElement != null && f is! InterfaceType;
3841
if (f is FunctionType) {
3942
assert(f is ParameterizedType);
4043
if (isGenericTypeAlias) {
@@ -44,7 +47,6 @@ abstract class ElementType extends Privacy {
4447
return CallableElementType(
4548
f, library, packageGraph, element, returnedFrom);
4649
} else if (isGenericTypeAlias) {
47-
assert(f is TypeParameterType);
4850
return GenericTypeAliasElementType(
4951
f, library, packageGraph, element, returnedFrom);
5052
}

0 commit comments

Comments
 (0)