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

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

Issue 2962583002: Add type inference for break and continue statements. (Closed)
Patch Set: Created 3 years, 6 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/kernel/kernel_shadow_ast.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/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 0a2be2bd99acc854a6c2d7f9b3d4f4e0928229ca..dc0d85def1d0b32ba7f55dfb0fd7b489dca3b145 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -2876,7 +2876,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
"Can't break to '$name' in a different function.",
breakKeyword.next.charOffset));
} else {
- BreakStatement statement = new BreakStatement(null)
+ BreakStatement statement = new KernelBreakStatement(null)
..fileOffset = breakKeyword.charOffset;
target.addBreak(statement);
push(statement);
@@ -2909,7 +2909,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
if (target.isGotoTarget &&
target.functionNestingLevel == functionNestingLevel) {
- ContinueSwitchStatement statement = new ContinueSwitchStatement(null);
+ ContinueSwitchStatement statement =
+ new KernelContinueSwitchStatement(null);
target.addGoto(statement);
push(statement);
return;
@@ -2926,7 +2927,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
"Can't continue at '$name' in a different function.",
continueKeyword.next.charOffset));
} else {
- BreakStatement statement = new BreakStatement(null)
+ BreakStatement statement = new KernelBreakStatement(null)
..fileOffset = continueKeyword.charOffset;
target.addContinue(statement);
push(statement);
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698