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

Unified Diff: frog/leg/resolver.dart

Issue 9619028: Cases in a switch introduce a new scope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | tests/language/language-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/resolver.dart
===================================================================
--- frog/leg/resolver.dart (revision 5121)
+++ frog/leg/resolver.dart (working copy)
@@ -1161,12 +1161,12 @@
visitSwitchCase(SwitchCase node) {
// TODO(ahe): What about the label?
node.expression.accept(this);
- node.statements.accept(this);
+ visitIn(node.statements, new BlockScope(context));
ahe 2012/03/07 22:24:15 I can't find this in the specification.
ngeoffray 2012/03/07 22:31:11 We have a test for it SwitchScopeTest. And the JSO
ahe 2012/04/13 13:50:19 Then you need to file a specification bug.
ngeoffray 2012/04/16 13:49:35 Yes: http://code.google.com/p/dart/issues/detail?i
ahe 2012/04/16 14:51:58 Thank you. Starred it :-)
}
visitDefaultCase(DefaultCase node) {
// TODO(ahe): What about the label?
- node.statements.accept(this);
+ visitIn(node.statements, new BlockScope(context));
}
visitTryStatement(TryStatement node) {
« no previous file with comments | « no previous file | tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698