Skip to content

Commit 92dcbeb

Browse files
committed
Merge pull request #1675 from gregomni/typealias
[SR-937] Fix infinite recursion adding Element typealias to Sequence.
2 parents 7318060 + 3c4dbcf commit 92dcbeb

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)