| Index: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| index 79c9a27d0c528bef41b72dbe8e62add93e0aa176..2db7033ba8e9426dc6465b5f322561435fe97753 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
|
| @@ -200,8 +200,7 @@ class ConstantHandler extends CompilerTask {
|
| && element.isField()) {
|
| DartType elementType = element.computeType(compiler);
|
| DartType constantType = value.computeType(compiler);
|
| - if (elementType.isMalformed || constantType.isMalformed ||
|
| - !constantSystem.isSubtype(compiler, constantType, elementType)) {
|
| + if (!constantSystem.isSubtype(compiler, constantType, elementType)) {
|
| if (isConst) {
|
| compiler.reportError(node, new CompileTimeConstantError(
|
| MessageKind.NOT_ASSIGNABLE,
|
| @@ -793,8 +792,7 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
|
| DartType constantType = constant.computeType(compiler);
|
| // TODO(ngeoffray): Handle type parameters.
|
| if (elementType.element.isTypeVariable()) return;
|
| - if (elementType.isMalformed || constantType.isMalformed ||
|
| - !constantSystem.isSubtype(compiler, constantType, elementType)) {
|
| + if (!constantSystem.isSubtype(compiler, constantType, elementType)) {
|
| compiler.reportError(node, new CompileTimeConstantError(
|
| MessageKind.NOT_ASSIGNABLE,
|
| {'fromType': elementType, 'toType': constantType}));
|
|
|