diff --git a/src/typecheck/index.ts b/src/typecheck/index.ts index 24b1184c..0bb7b584 100644 --- a/src/typecheck/index.ts +++ b/src/typecheck/index.ts @@ -271,6 +271,10 @@ export const extractConcreteSupertype = ( ): VirtualType | undefined => { if (type.kind !== 'vid-type') return undefined + if (vidEq(type.identifier, superVid)) { + return type + } + const chain = findSuperRelChains(type.identifier, ctx) .filter(c => { const implType = c.at(-1)!.implType