Index: pkg/compiler/lib/src/types/constants.dart |
diff --git a/pkg/compiler/lib/src/types/constants.dart b/pkg/compiler/lib/src/types/constants.dart |
index 7ba262165aec0e36e6940718b68e8a738b795e68..c2160ff77ecf1a4c36f0be7ff0944342926233f2 100644 |
--- a/pkg/compiler/lib/src/types/constants.dart |
+++ b/pkg/compiler/lib/src/types/constants.dart |
@@ -7,6 +7,7 @@ library types.constants; |
import '../constants/values.dart'; |
import '../dart2jslib.dart'; |
import 'types.dart'; |
+import '../js_backend/js_backend.dart' show DummyConstantKinds; |
/// Computes the [TypeMask] for the constant [value]. |
TypeMask computeTypeMask(Compiler compiler, ConstantValue value) { |
@@ -46,7 +47,18 @@ class ConstantValueTypeMasks extends ConstantValueVisitor<TypeMask, Compiler> { |
@override |
TypeMask visitDummy(DummyConstantValue constant, Compiler compiler) { |
- return constant.typeMask; |
+ switch (constant.kind) { |
+ case DummyConstantKinds.dummyReceiver: |
+ return constant.payload; |
+ case DummyConstantKinds.emptyValue: |
+ return constant.payload; |
+ case DummyConstantKinds.typeVariableReference: |
+ return compiler.typesTask.intType; |
+ default: |
+ compiler.internalError(compiler.currentElement, |
+ "Unexpected DummyConstantKind."); |
+ return null; |
+ } |
} |
@override |