Skip to content

Commit e4ddba2

Browse files
Merge pull request #17916 from aschwaighofer/fix_getSpecializedConformance_4.2
[4.2] ASTContext: Recompute the insert position in getSpecializedConformance after the SpecializedProtocolConformance constructor
2 parents 9b78d53 + 0d44d09 commit e4ddba2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/AST/ASTContext.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,9 @@ ASTContext::getSpecializedConformance(Type type,
18711871
auto result
18721872
= new (*this, arena) SpecializedProtocolConformance(type, generic,
18731873
substitutions);
1874+
auto node = specializedConformances.FindNodeOrInsertPos(id, insertPos);
1875+
(void)node;
1876+
assert(!node);
18741877
specializedConformances.InsertNode(result, insertPos);
18751878
return result;
18761879
}

0 commit comments

Comments
 (0)