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 49ef06fd51e71cba15aa20c935b1ea8b208e9e7f..0636e28a842d47da4bfd8b3cd183b25a2d2b20da 100644 |
--- a/pkg/analyzer/lib/src/dart/element/element.dart |
+++ b/pkg/analyzer/lib/src/dart/element/element.dart |
@@ -5172,10 +5172,11 @@ class GenericTypeAliasElementImpl extends ElementImpl |
} |
@override |
- List<ParameterElement> get parameters => function.parameters; |
+ List<ParameterElement> get parameters => |
+ function?.parameters ?? const <ParameterElement>[]; |
@override |
- DartType get returnType => function.returnType; |
+ DartType get returnType => function?.returnType; |
@override |
FunctionType get type { |
@@ -5227,7 +5228,9 @@ class GenericTypeAliasElementImpl extends ElementImpl |
buffer.write(">"); |
} |
buffer.write(" = "); |
- (function as FunctionElementImpl).appendTo(buffer); |
+ if (function != null) { |
+ (function as ElementImpl).appendTo(buffer); |
+ } |
} |
@override |