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.
2 parents 3f3abfd + 614cb48 commit 66ee83fCopy full SHA for 66ee83f
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