Index: pkg/analyzer/lib/src/dart/element/builder.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart |
index 6821bcfa044130383f6cfdad2b6c11c1791a333b..f90698a8b044d1eec932c459c47a119e19e10524 100644 |
--- a/pkg/analyzer/lib/src/dart/element/builder.dart |
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart |
@@ -456,7 +456,7 @@ class ApiElementBuilder extends _BaseElementBuilder { |
element.typeParameters = typeParameters; |
_createTypeParameterTypes(typeParameters); |
element.type = new FunctionTypeImpl.forTypedef(element); |
- element.function = node.functionType.type.element; |
+ element.function = node.functionType?.type?.element; |
_currentHolder.addTypeAlias(element); |
aliasName.staticElement = element; |
holder.validate(); |
@@ -1446,7 +1446,7 @@ abstract class _BaseElementBuilder extends RecursiveAstVisitor<Object> { |
if (normalParameter is SimpleFormalParameterImpl) { |
normalParameter.element = parameter; |
} |
- parameterName.staticElement = parameter; |
+ parameterName?.staticElement = parameter; |
normalParameter.accept(this); |
return null; |
} |