From b52fea06abcca3332d007f1e1b900a56597e6e37 Mon Sep 17 00:00:00 2001 From: ivanjermakov Date: Tue, 30 Apr 2024 12:34:11 +0200 Subject: [PATCH] Typecheck: `extractConcreteSupertype` handle itself --- src/typecheck/index.ts | 4 ++++ 1 file changed, 4 insertions(+) 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