| Index: pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
|
| index 008b709a179658883843f7942e7eae557fd57ab0..9bc3a86a016844cac6a1af67a8ce47a0c5c94fdb 100644
|
| --- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
|
| @@ -44,6 +44,7 @@ class JavaScriptConstantTask extends ConstantCompilerTask {
|
| @override
|
| ConstantExpression compileConstant(VariableElement element) {
|
| return measure(() {
|
| + // TODO(het): Only report errors from one of the constant compilers
|
| ConstantExpression result = dartConstantCompiler.compileConstant(element);
|
| jsConstantCompiler.compileConstant(element);
|
| return result;
|
| @@ -126,12 +127,13 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
|
|
|
| ConstantExpression compileVariableWithDefinitions(VariableElement element,
|
| TreeElements definitions,
|
| - {bool isConst: false}) {
|
| + {bool isConst: false,
|
| + bool checkType: true}) {
|
| if (!isConst && lazyStatics.contains(element)) {
|
| return null;
|
| }
|
| ConstantExpression value = super.compileVariableWithDefinitions(
|
| - element, definitions, isConst: isConst);
|
| + element, definitions, isConst: isConst, checkType: checkType);
|
| if (!isConst && value == null) {
|
| lazyStatics.add(element);
|
| }
|
|
|