diff --git a/lib/src/element_type.dart b/lib/src/element_type.dart index 89d4b9013c..1a12cd5103 100644 --- a/lib/src/element_type.dart +++ b/lib/src/element_type.dart @@ -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) { diff --git a/lib/src/model/model_element.dart b/lib/src/model/model_element.dart index 6bae86e41d..4ba3de3ac4 100644 --- a/lib/src/model/model_element.dart +++ b/lib/src/model/model_element.dart @@ -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); } diff --git a/lib/src/model/typedef.dart b/lib/src/model/typedef.dart index 9db4883d89..3be07634b2 100644 --- a/lib/src/model/typedef.dart +++ b/lib/src/model/typedef.dart @@ -24,8 +24,8 @@ class Typedef extends ModelElement String get genericParameters => _renderer.renderGenericParameters(this); List get genericTypeParameters { - if (element is GenericTypeAliasElement) { - return (element as GenericTypeAliasElement).function.typeParameters; + if (element is FunctionTypeAliasElement) { + return (element as FunctionTypeAliasElement).function.typeParameters; } return Iterable.empty(); }