Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7ba1997

Browse files
Save transient state
Change-Id: I1c2405b1237b6017a92b789452671938e0c25705 Reviewed-on: https://dart-review.googlesource.com/c/88448 Reviewed-by: Dmitry Stefantsov <[email protected]> Commit-Queue: Peter von der Ahé <[email protected]>
1 parent 2bb2f5e commit 7ba1997

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ class ClassHierarchyBuilder {
156156
}
157157

158158
void add(KernelClassBuilder cls) {
159+
assert(!hasNoSuchMethod);
160+
assert(abstractMemberCount == 0);
159161
if (cls.isPatch) {
160162
// TODO(ahe): What about patch classes. Have we injected patched members
161163
// into the class-builder's scope?
@@ -390,7 +392,13 @@ class ClassHierarchyBuilder {
390392
if (declaration is KernelClassBuilder) {
391393
ClassHierarchyNode node = nodes[declaration];
392394
if (node == null) {
395+
bool savedHasNoSuchMethod = hasNoSuchMethod;
396+
hasNoSuchMethod = false;
397+
int savedAbstractMemberCount = abstractMemberCount;
398+
abstractMemberCount = 0;
393399
add(declaration);
400+
hasNoSuchMethod = savedHasNoSuchMethod;
401+
abstractMemberCount = savedAbstractMemberCount;
394402
node = nodes[declaration];
395403
}
396404
return node;

0 commit comments

Comments
 (0)