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

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

Issue 1710913004: Set hasImplicitReturnType for variable initializer functions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.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 17133454c89017c426163beebcdbccabbed15214..7449de14ad0fc6bd9302237570c9efd42fff87b7 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -557,6 +557,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
_visit(holder, defaultValue);
FunctionElementImpl initializer =
new FunctionElementImpl.forOffset(defaultValue.beginToken.offset);
+ initializer.hasImplicitReturnType = true;
initializer.functions = holder.functions;
initializer.labels = holder.labels;
initializer.localVariables = holder.localVariables;
@@ -1158,6 +1159,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
_visit(holder, node.initializer);
FunctionElementImpl initializer =
new FunctionElementImpl.forOffset(node.initializer.beginToken.offset);
+ initializer.hasImplicitReturnType = true;
initializer.functions = holder.functions;
initializer.labels = holder.labels;
initializer.localVariables = holder.localVariables;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698