| Index: pkg/compiler/lib/src/js_backend/constant_emitter.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
|
| index 8f5738f96e59a80118faf0807c066028ced1dee8..1b3e95fed7efa0b9fb1b0a6ff69d9d1e2ac6fc74 100644
|
| --- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
|
| @@ -272,14 +272,15 @@ class ConstantEmitter
|
| Element element = constant.type.element;
|
| if (element.isForeign(backend)
|
| && element.name == 'JS_CONST') {
|
| - StringConstantValue str = constant.fields[0];
|
| + StringConstantValue str = constant.fields.values.single;
|
| String value = str.primitiveValue.slowToString();
|
| return new jsAst.LiteralExpression(stripComments(value));
|
| }
|
| jsAst.Expression constructor =
|
| backend.emitter.constructorAccess(constant.type.element);
|
| List<jsAst.Expression> fields =
|
| - constant.fields.map(constantReferenceGenerator).toList(growable: false);
|
| + constant.fields.values.map(constantReferenceGenerator)
|
| + .toList(growable: false);
|
| jsAst.New instantiation = new jsAst.New(constructor, fields);
|
| return maybeAddTypeArguments(constant.type, instantiation);
|
| }
|
|
|