Index: pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart |
index 1bce990241a61b97bfc944e19630fefc6243730c..fadda95d116b6ad8cc5a57b8fb896842d5aeccd4 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart |
@@ -125,10 +125,11 @@ class KernelEnumBuilder extends SourceClassBuilder |
/// static const List<E> values = const <E>[id0, ..., idn-1]; |
/// String toString() => { 0: ‘E.id0’, . . ., n-1: ‘E.idn-1’}[index] |
/// } |
- members["index"] = new KernelFieldBuilder( |
- null, intType, "index", finalMask, parent, charOffset, null, true); |
+ members["index"] = new KernelFieldBuilder(null, null, intType, "index", |
+ finalMask, parent, charOffset, null, true); |
KernelConstructorBuilder constructorBuilder = new KernelConstructorBuilder( |
null, |
+ null, |
constMask, |
null, |
"", |
@@ -144,11 +145,20 @@ class KernelEnumBuilder extends SourceClassBuilder |
constructors[""] = constructorBuilder; |
int index = 0; |
List<MapEntry> toStringEntries = <MapEntry>[]; |
- KernelFieldBuilder valuesBuilder = new KernelFieldBuilder(null, listType, |
- "values", constMask | staticMask, parent, charOffset, null, true); |
+ KernelFieldBuilder valuesBuilder = new KernelFieldBuilder( |
+ null, |
+ null, |
+ listType, |
+ "values", |
+ constMask | staticMask, |
+ parent, |
+ charOffset, |
+ null, |
+ true); |
members["values"] = valuesBuilder; |
KernelProcedureBuilder toStringBuilder = new KernelProcedureBuilder( |
null, |
+ null, |
0, |
stringType, |
"toString", |
@@ -178,8 +188,16 @@ class KernelEnumBuilder extends SourceClassBuilder |
constantNamesAndOffsets[i] = null; |
continue; |
} |
- KernelFieldBuilder fieldBuilder = new KernelFieldBuilder(null, selfType, |
- name, constMask | staticMask, parent, charOffset, null, true); |
+ KernelFieldBuilder fieldBuilder = new KernelFieldBuilder( |
+ null, |
+ null, |
+ selfType, |
+ name, |
+ constMask | staticMask, |
+ parent, |
+ charOffset, |
+ null, |
+ true); |
members[name] = fieldBuilder; |
toStringEntries.add(new MapEntry( |
new IntLiteral(index), new StringLiteral("$className.$name"))); |