mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-18 16:08:55 +00:00
fix(python): report circular inheritance again: a class may list itself once as its own ancestor
This commit is contained in:
@@ -302,7 +302,8 @@ export async function ancestryResolution(
|
||||
cls: ClassInheritance,
|
||||
depth = 8,
|
||||
): Promise<AncestryResolution> {
|
||||
const seen = new Set<string>([declarationKey(cls)]);
|
||||
// `cls` itself is not pre-seen: a cycle lists it once as its own ancestor.
|
||||
const seen = new Set<string>();
|
||||
const out: AncestorNode[] = [];
|
||||
let firstUnresolvedDepth = Infinity;
|
||||
let level: ClassInheritance[] = [cls];
|
||||
|
||||
Reference in New Issue
Block a user