| Index: pkg/compiler/lib/src/js_emitter/metadata_collector.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
|
| index 44c484d1a2f75a98af3a48d1520a0fb188d64181..a2501fd668653c3e292171c825ec0934d74f2d3f 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
|
| @@ -110,6 +110,13 @@ class MetadataCollector {
|
| return _backend.isAccessibleByReflection(typedef.element);
|
| });
|
|
|
| + if (representation is jsAst.LiteralString) {
|
| + // We don't want the representation to be a string, since we use
|
| + // strings as indicator for non-initialized types in the lazy emitter.
|
| + _compiler.internalError(
|
| + NO_LOCATION_SPANNABLE, 'reified types should not be strings.');
|
| + }
|
| +
|
| return addTypeInOutputUnit(representation, outputUnit);
|
| }
|
|
|
| @@ -133,8 +140,9 @@ class MetadataCollector {
|
| }
|
| return _typesMap[outputUnit].putIfAbsent(string, () {
|
|
|
| - if (types[outputUnit] == null)
|
| + if (types[outputUnit] == null) {
|
| types[outputUnit] = <jsAst.Expression>[];
|
| + }
|
|
|
| types[outputUnit].add(type);
|
| return types[outputUnit].length - 1;
|
|
|