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 2f1889581682dcdabf9cf078edba1a0fdbe2df3f..baaef0ba5bf4932824591a6cd7756eb6ef9cf25b 100644 |
--- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart |
+++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart |
@@ -199,8 +199,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.reportFatalError( |
node, MessageKind.NOT_ASSIGNABLE.error, |
@@ -790,8 +789,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.reportFatalError( |
node, MessageKind.NOT_ASSIGNABLE.error, |
{'fromType': elementType, 'toType': constantType}); |