Skip to content

Commit 3c4dbcf

Browse files
committed
[SR-937] Fix infinite recursion adding Element typealias to Sequence.
1 parent 03f5c71 commit 3c4dbcf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/AST/ArchetypeBuilder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ auto ArchetypeBuilder::PotentialArchetype::getNestedType(
501501
auto existingPA = this;
502502
while(identifiers.size()) {
503503
existingPA = existingPA->getNestedType(identifiers.back(), builder);
504+
existingPA = existingPA->getRepresentative();
505+
if (existingPA == this)
506+
break;
504507
identifiers.pop_back();
505508
}
506509
pa->Representative = existingPA;

0 commit comments

Comments
 (0)