Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/src/element_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ abstract class ElementType extends Privacy {
// TODO(jcollins-g): Remove reference to f.element.enclosingElement after
// analyzer 0.41.
var isGenericTypeAlias =
f.element.enclosingElement is GenericTypeAliasElement ||
f.element is GenericTypeAliasElement;
f.element.enclosingElement is FunctionTypeAliasElement ||
f.element is FunctionTypeAliasElement;
if (f is FunctionType) {
assert(f is ParameterizedType);
if (isGenericTypeAlias) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/model/model_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ abstract class ModelElement extends Canonicalization
if (e is FunctionElement) {
return ModelFunction(e, library, packageGraph);
} else if (e is GenericFunctionTypeElement) {
assert(e.enclosingElement is GenericTypeAliasElement);
assert(e.enclosingElement is FunctionTypeAliasElement);
assert(e.enclosingElement.name != '');
return ModelFunctionTypedef(e, library, packageGraph);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/model/typedef.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class Typedef extends ModelElement
String get genericParameters => _renderer.renderGenericParameters(this);

List<TypeParameterElement> get genericTypeParameters {
if (element is GenericTypeAliasElement) {
return (element as GenericTypeAliasElement).function.typeParameters;
if (element is FunctionTypeAliasElement) {
return (element as FunctionTypeAliasElement).function.typeParameters;
}
return Iterable<TypeParameterElement>.empty();
}
Expand Down