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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart

Issue 2882863002: Implement full closure inference logic. (Closed)
Patch Set: Created 3 years, 7 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/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index c613219a77babb153d6842a1c0734fd62596db8f..6e5e97ded274c344fb44fa6b0d6c89d4da8fb0d9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -301,13 +301,8 @@ class KernelFunctionExpression extends FunctionExpression
bool isGenerator = asyncMarker == AsyncMarker.SyncStar ||
asyncMarker == AsyncMarker.AsyncStar;
return inferrer.inferFunctionExpression(
- typeContext,
- typeNeeded,
- function.body,
- function.body is ReturnStatement,
- isAsync,
- isGenerator,
- fileOffset, (type) {
+ typeContext, typeNeeded, function, isAsync, isGenerator, fileOffset,
+ (type) {
function.returnType = type;
}, () => function.functionType);
}
@@ -958,6 +953,14 @@ class KernelVariableDeclaration extends VariableDeclaration
this.type = type;
});
}
+
+ /// Determine whether the given [KernelVariableDeclaration] had an implicit
+ /// type.
+ ///
+ /// This is static to avoid introducing a method that would be visible to
+ /// the kernel.
+ static bool isImplicitlyTyped(KernelVariableDeclaration variable) =>
+ variable._implicitlyTyped;
}
/// Concrete shadow object representing a read from a variable in kernel form.
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698