Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: pkg/analyzer/lib/src/dart/element/builder.dart

Issue 2770143002: More generic function type cases working (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698