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

Unified Diff: pkg/front_end/lib/src/fasta/builder/scope.dart

Issue 2743323003: Don't crash on non-forward labels in switches. (Closed)
Patch Set: Created 3 years, 9 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 | 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/builder/scope.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/scope.dart b/pkg/front_end/lib/src/fasta/builder/scope.dart
index 10e5c39c864c2817993f03e92f5700b05b310062..60e4f9df796c23a62401fa05c64f9f64ca8276a1 100644
--- a/pkg/front_end/lib/src/fasta/builder/scope.dart
+++ b/pkg/front_end/lib/src/fasta/builder/scope.dart
@@ -108,6 +108,7 @@ class Scope {
}
void claimLabel(String name) {
+ if (forwardDeclaredLabels == null) return;
forwardDeclaredLabels.remove(name);
if (forwardDeclaredLabels.length == 0) {
forwardDeclaredLabels = null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698