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

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

Issue 2758123002: Create a new element for generic function types (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/dart/element/visitor.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 7c74fdf8437110711c1d349198c07486e291fec6..9ce994929e7b300457e80089610e70fceb568bca 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -430,17 +430,13 @@ class ApiElementBuilder extends _BaseElementBuilder {
Object visitGenericFunctionType(GenericFunctionType node) {
ElementHolder holder = new ElementHolder();
_visitChildren(holder, node);
- FunctionElementImpl element =
- new FunctionElementImpl.forOffset(node.beginToken.offset);
+ GenericFunctionTypeElementImpl element =
+ new GenericFunctionTypeElementImpl.forOffset(node.beginToken.offset);
_setCodeRange(element, node);
element.parameters = holder.parameters;
element.typeParameters = holder.typeParameters;
FunctionType type = new FunctionTypeImpl(element);
element.type = type;
- if (node.returnType == null) {
- element.hasImplicitReturnType = true;
- }
- _currentHolder.addFunction(element);
(node as GenericFunctionTypeImpl).type = type;
holder.validate();
return null;
« no previous file with comments | « pkg/analyzer/lib/dart/element/visitor.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