Index: dart/frog/leg/compiler.dart |
=================================================================== |
--- dart/frog/leg/compiler.dart (revision 3786) |
+++ dart/frog/leg/compiler.dart (working copy) |
@@ -212,7 +212,8 @@ |
String codegen(WorkItem work) { |
String code; |
- if (work.element.kind == ElementKind.FIELD) { |
+ if (work.element.kind == ElementKind.FIELD |
+ || work.element.kind == ElementKind.PARAMETER) { |
compileTimeConstantHandler.compileWorkItem(work); |
return null; |
} else { |
@@ -271,6 +272,14 @@ |
return resolver.resolveSignature(element); |
} |
+ Object compileVariable(VariableElement element) { |
+ Element savedElement = currentElement; |
floitsch
2012/02/01 14:35:39
why is this necessary?
ngeoffray
2012/02/01 15:54:59
To get proper error messages if the work item gene
|
+ currentElement = element; |
+ compile(new WorkItem.toCompile(element)); |
+ currentElement = savedElement; |
+ return compileTimeConstantHandler.compileVariable(element); |
+ } |
+ |
reportWarning(Node node, var message) {} |
reportError(Node node, var message) {} |