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

Unified Diff: sdk/lib/_internal/compiler/implementation/closure.dart

Issue 24488004: Implement correct scoping rules for variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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: sdk/lib/_internal/compiler/implementation/closure.dart
diff --git a/sdk/lib/_internal/compiler/implementation/closure.dart b/sdk/lib/_internal/compiler/implementation/closure.dart
index a91f9ab3feb0dfcd305c98eb1b13b1388c10c0a1..ce5990661000c9146467a9e32aab66a2630942b7 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -465,7 +465,8 @@ class ClosureTranslator extends Visitor {
link = link.tail) {
Node definition = link.head;
Element element = elements[definition];
- assert(element != null);
+ assert(invariant(definition, element != null,
+ message: "unresolved local definition"));
declareLocal(element);
// We still need to visit the right-hand sides of the init-assignments.
// For SendSets don't visit the left again. Otherwise it would be marked

Powered by Google App Engine
This is Rietveld 408576698