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

Unified Diff: dart/frog/leg/compile_time_constants.dart

Issue 9808006: Resolve initializers in their proper scope. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Revert bogus changes 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 | dart/frog/leg/resolver.dart » ('j') | dart/frog/leg/resolver.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/compile_time_constants.dart
diff --git a/dart/frog/leg/compile_time_constants.dart b/dart/frog/leg/compile_time_constants.dart
index c4d932b2cc919f28d4130e860bb5a8a758a00fc7..bee8dfaf6a812bd6fde67c4ee25ac446a7279845 100644
--- a/dart/frog/leg/compile_time_constants.dart
+++ b/dart/frog/leg/compile_time_constants.dart
@@ -934,6 +934,8 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
}
Constant visitNewExpression(NewExpression node) {
+ Element currentElement = compiler.currentElement;
+
void assignArgumentsToParameters(
FunctionParameters parameters,
Map<Element, Constant> constructorDefinitions,
@@ -999,7 +1001,9 @@ class CompileTimeConstantEvaluator extends AbstractVisitor {
}
}
if (classElement.superclass != compiler.coreLibrary.find(Types.OBJECT)) {
- compiler.unimplemented("ConstantHandler with super", node: node);
+ compiler.withCurrentElement(currentElement, () {
ngeoffray 2012/03/23 07:50:22 Why is that necessary? The withCurrentElement line
ahe 2012/03/23 11:30:31 That's the wrong element. It is the element for th
+ compiler.unimplemented("ConstantHandler with super", node: node);
+ });
}
return jsNewArguments;
}
« no previous file with comments | « no previous file | dart/frog/leg/resolver.dart » ('j') | dart/frog/leg/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698