mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Fix crash when doing name lookup into class with circular inheritance
This commit is contained in:
@@ -319,6 +319,10 @@ void ConformanceLookupTable::updateLookupTable(NominalTypeDecl *nominal,
|
||||
return;
|
||||
llvm::SaveAndRestore<bool> visiting(VisitingSuperclass, true);
|
||||
|
||||
// Don't update our own lookup table if we inherit from ourselves.
|
||||
if (classDecl == superclassDecl)
|
||||
break;
|
||||
|
||||
// Resolve the conformances of the superclass.
|
||||
superclassDecl->prepareConformanceTable();
|
||||
superclassDecl->ConformanceTable->updateLookupTable(
|
||||
|
||||
Reference in New Issue
Block a user