Index: pkg/compiler/lib/src/native/behavior.dart |
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart |
index 7088f103a192c13dd66c167ecafc4a17d16a9909..6e6c53a8e357c9ace885c2333992ee334e8ae04c 100644 |
--- a/pkg/compiler/lib/src/native/behavior.dart |
+++ b/pkg/compiler/lib/src/native/behavior.dart |
@@ -694,14 +694,14 @@ class NativeBehavior { |
ConstructedConstantValue constructedObject = value; |
if (constructedObject.type.element != annotationClass) continue; |
- List<ConstantValue> fields = constructedObject.fields; |
+ Iterable<ConstantValue> fields = constructedObject.fields.values; |
// TODO(sra): Better validation of the constant. |
- if (fields.length != 1 || !fields[0].isString) { |
+ if (fields.length != 1 || !fields.single.isString) { |
PartialMetadataAnnotation partial = annotation; |
compiler.internalError(annotation, |
'Annotations needs one string: ${partial.parseNode(compiler)}'); |
} |
- StringConstantValue specStringConstant = fields[0]; |
+ StringConstantValue specStringConstant = fields.single; |
String specString = specStringConstant.toDartString().slowToString(); |
for (final typeString in specString.split('|')) { |
var type = _parseType(typeString, compiler, lookup, annotation); |