We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2c4250 commit 614cb48Copy full SHA for 614cb48
lib/AST/Decl.cpp
@@ -3210,6 +3210,7 @@ AssociatedTypeDecl *AssociatedTypeDecl::getAssociatedTypeAnchor() const {
3210
// Find the best anchor among the anchors of the overridden decls.
3211
AssociatedTypeDecl *bestAnchor = nullptr;
3212
for (auto assocType : overridden) {
3213
+ assert(this != assocType && "AssociatedTypeDecl cannot override itself");
3214
auto anchor = assocType->getAssociatedTypeAnchor();
3215
if (!bestAnchor || compare(anchor, bestAnchor) < 0)
3216
bestAnchor = anchor;
0 commit comments