Skip to content

Commit

Permalink
Typecheck: extractConcreteSupertype handle itself
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Apr 30, 2024
1 parent 31407ba commit b52fea0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/typecheck/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <VidType>c.at(-1)!.implType
Expand Down

0 comments on commit b52fea0

Please sign in to comment.