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

Unified Diff: runtime/vm/scopes.cc

Issue 10907064: Fix argument definition test (issue 4888). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.cc
===================================================================
--- runtime/vm/scopes.cc (revision 11834)
+++ runtime/vm/scopes.cc (working copy)
@@ -477,7 +477,9 @@
LocalScope* LocalScope::RestoreOuterScope(const ContextScope& context_scope) {
- LocalScope* outer_scope = new LocalScope(NULL, 0, 0);
+ // The function level of the outer scope is one less than the function level
+ // of the current function, which is 0.
+ LocalScope* outer_scope = new LocalScope(NULL, -1, 0);
// Add all variables as aliases to the outer scope.
for (int i = 0; i < context_scope.num_variables(); i++) {
LocalVariable* variable =
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698