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

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

Issue 2860173002: Create KernelVariableDeclaration for formal parameters. (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 | « pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart ('k') | no next file » | 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 48a7845160516d20b6cb907503d7d3b92afba579..d59a8c1aabe33c153c1d30e354e049422c664534 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
@@ -864,20 +864,9 @@ class KernelVariableGet extends VariableGet implements KernelExpression {
@override
DartType _inferExpression(
KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) {
- bool mutatedInClosure;
- DartType declaredType;
- var variable = this.variable;
- if (variable is KernelVariableDeclaration) {
- mutatedInClosure = variable._mutatedInClosure;
- declaredType = variable._declaredType;
- } else {
- // Hack to deal with the fact that BodyBuilder still creates raw
- // VariableDeclaration objects sometimes.
- // TODO(paulberry): get rid of this once the type parameter is
- // KernelVariableDeclaration.
- mutatedInClosure = true;
- declaredType = variable.type;
- }
+ var variable = this.variable as KernelVariableDeclaration;
+ bool mutatedInClosure = variable._mutatedInClosure;
+ DartType declaredType = variable._declaredType;
return inferrer.inferVariableGet(typeContext, typeNeeded, mutatedInClosure,
_fact, _scope, fileOffset, declaredType, (type) {
promotedType = type;
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698