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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 16043007: Create a new scope when analyzing then and else of an if. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/resolution/members.dart (revision 23208)
+++ sdk/lib/_internal/compiler/implementation/resolution/members.dart (working copy)
@@ -1953,8 +1953,8 @@
visitIf(If node) {
visit(node.condition);
- visit(node.thenPart);
- visit(node.elsePart);
+ visitIn(node.thenPart, new BlockScope(scope));
+ visitIn(node.elsePart, new BlockScope(scope));
}
static bool isLogicalOperator(Identifier op) {
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698