Index: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
index 60e05d621d6886d26bfd7a327719a3eef74e29fc..d7598fd056935e29db2a8ea7d4acfe8a774c18ce 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart |
@@ -101,6 +101,8 @@ class KernelLibraryBuilder |
KernelTypeBuilder supertype, |
List<KernelTypeBuilder> interfaces, |
int charOffset) { |
+ assert(currentDeclaration.parent == libraryDeclaration); |
+ Map<String, MemberBuilder> members = currentDeclaration.members; |
ClassBuilder cls = new SourceClassBuilder( |
metadata, |
modifiers, |
@@ -108,12 +110,12 @@ class KernelLibraryBuilder |
typeVariables, |
supertype, |
interfaces, |
- classMembers, |
+ members, |
this, |
new List<ConstructorReferenceBuilder>.from(constructorReferences), |
charOffset); |
constructorReferences.clear(); |
- classMembers.forEach((String name, MemberBuilder builder) { |
+ members.forEach((String name, MemberBuilder builder) { |
while (builder != null) { |
builder.parent = cls; |
builder = builder.next; |