diff --git a/src/editor/navigation/inheritanceGraph.ts b/src/editor/navigation/inheritanceGraph.ts index adbcb4b33..6469a9dca 100644 --- a/src/editor/navigation/inheritanceGraph.ts +++ b/src/editor/navigation/inheritanceGraph.ts @@ -302,7 +302,8 @@ export async function ancestryResolution( cls: ClassInheritance, depth = 8, ): Promise { - const seen = new Set([declarationKey(cls)]); + // `cls` itself is not pre-seen: a cycle lists it once as its own ancestor. + const seen = new Set(); const out: AncestorNode[] = []; let firstUnresolvedDepth = Infinity; let level: ClassInheritance[] = [cls];