| 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 bd4ab2977a33f45cc8051c6ee5843a4bb8377247..cad4338308896d7dfdacf6b2f3e3105986b5d73e 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
|
| @@ -112,6 +112,12 @@ 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(
|
| jsAst.prettyPrint(representation, _compiler).getText(), outputUnit);
|
| }
|
| @@ -133,8 +139,9 @@ class MetadataCollector {
|
| }
|
| return _typesMap[outputUnit].putIfAbsent(compiledType, () {
|
|
|
| - if (types[outputUnit] == null)
|
| + if (types[outputUnit] == null) {
|
| types[outputUnit] = <String>[];
|
| + }
|
|
|
| types[outputUnit].add(compiledType);
|
| return types[outputUnit].length - 1;
|
|
|