Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1013)

Unified Diff: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart

Issue 19097003: Support new malformed types semantics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittests. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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});
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698