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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/LabelElement.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/LabelElement.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/LabelElement.java b/compiler/java/com/google/dart/compiler/resolver/LabelElement.java
index 07a891c0801ea6e124898f0db4d13d4950e1c820..8fb58d91c00dcbfd197e7b2c7ae1fc15333ba996 100644
--- a/compiler/java/com/google/dart/compiler/resolver/LabelElement.java
+++ b/compiler/java/com/google/dart/compiler/resolver/LabelElement.java
@@ -5,8 +5,17 @@
package com.google.dart.compiler.resolver;
public interface LabelElement extends Element {
+
+ public enum LabeledStatementType {
+ STATEMENT,
+ SWITCH_MEMBER_STATEMENT,
+ SWITCH_STATEMENT,
+ }
+
/**
* Returns the innermost function where this label is defined.
*/
public MethodElement getEnclosingFunction();
+
+ public LabeledStatementType getStatementType();
}

Powered by Google App Engine
This is Rietveld 408576698