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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java

Issue 10725002: Validate the target of break and continue statments from within a switch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: # Created 8 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
Index: compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java b/compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java
index 6f2253f7cbe48e8fe0aaa76fd22e21a7733148b6..f61c03db82ef8c31aa411e79ef02505368125bec 100644
--- a/compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/LabelElementImplementation.java
@@ -9,10 +9,13 @@ import com.google.dart.compiler.ast.DartLabel;
class LabelElementImplementation extends AbstractNodeElement implements LabelElement {
private MethodElement enclosingFunction;
-
- LabelElementImplementation(DartLabel node, String name, MethodElement enclosingFunction) {
+ private final LabeledStatementType statementType;
+
+ LabelElementImplementation(DartLabel node, String name, MethodElement enclosingFunction,
+ LabeledStatementType statementType) {
super(node, name);
this.enclosingFunction = enclosingFunction;
+ this.statementType = statementType;
}
@Override
@@ -24,4 +27,9 @@ class LabelElementImplementation extends AbstractNodeElement implements LabelEle
public MethodElement getEnclosingFunction() {
return enclosingFunction;
}
+
+ @Override
+ public LabeledStatementType getStatementType() {
+ return statementType;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698