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

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

Issue 2801283002: Wrap VariableDeclarations in Blocks as specified by Kernel. (Closed)
Patch Set: Update strong.status. Created 3 years, 8 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/test/fasta/compile.status » ('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/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 09fa92e893162aa71fac8d0afdb4847bcfad65ec..2ad1169e099bd920b9aaac042e44fbe81d229357 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -234,6 +234,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
var statement = pop();
if (statement is List) {
return new Block(new List<Statement>.from(statement));
+ } else if (statement is VariableDeclaration) {
+ return new Block(<Statement>[statement]);
} else {
return statement;
}
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/compile.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698