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

Unified Diff: runtime/vm/parser.cc

Issue 22415002: Fix access to type variables in initializer expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | runtime/vm/scopes.h » ('j') | runtime/vm/scopes.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 25809)
+++ runtime/vm/parser.cc (working copy)
@@ -5057,16 +5057,11 @@
void Parser::CaptureInstantiator() {
ASSERT(current_block_->scope->function_level() > 0);
- const bool kTestOnly = false;
- // Side effect of lookup captures the instantiator variable.
- LocalVariable* instantiator = NULL;
if (current_function().IsInFactoryScope()) {
- instantiator = LookupTypeArgumentsParameter(current_block_->scope,
- kTestOnly);
+ current_block_->scope->CaptureVariable(Symbols::TypeArgumentsParameter());
} else {
- instantiator = LookupReceiver(current_block_->scope, kTestOnly);
+ current_block_->scope->CaptureVariable(Symbols::This());
}
- ASSERT(instantiator != NULL);
}
« no previous file with comments | « no previous file | runtime/vm/scopes.h » ('j') | runtime/vm/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698