| 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 909b11361f3492f8eaeef58432a4048e3a82be2b..3bc94e5eb070cbed11303a4f6bf3cbe91b99acca 100644
|
| --- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
|
| @@ -244,6 +244,21 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
|
| element.node.accept(new ForgetConstantNodeVisitor(this));
|
| }
|
| }
|
| +
|
| + ConstantValue getConstantValue(ConstantExpression expression) {
|
| + ConstantValue value = super.getConstantValue(expression);
|
| + if (value == null &&
|
| + expression != null &&
|
| + expression.kind == ConstantExpressionKind.ERRONEOUS) {
|
| + // TODO(johnniwinther): When the Dart constant system sees a constant
|
| + // expression as erroneous but the JavaScript constant system finds it ok
|
| + // we have store a constant value for the erroneous constant expression.
|
| + // Ensure the computed constant expressions are always the same; that only
|
| + // the constant values may be different.
|
| + value = new NullConstantValue();
|
| + }
|
| + return value;
|
| + }
|
| }
|
|
|
| class ForgetConstantElementVisitor
|
|
|