Skip to content

Commit

Permalink
Semantic: method def stub
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Mar 31, 2024
1 parent 3daf705 commit 8eb8d76
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/semantic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,8 @@ export const checkIdentifier = (identifier: Identifier, ctx: Context): void => {
) {
addError(ctx, privateAccessError(ctx, identifier, 'method', ref.def.fn.name.value))
}
const instScope: InstanceScope = {
kind: 'instance',
rel: ref.def.rel,
def: ref.def.rel.instanceDef,
definitions: new Map(ref.def.rel.instanceDef.generics.map(g => [defKey(g), g]))
}

identifier.type = resolveType(ref.def.fn.type!, [instanceGenericMap(instScope, ctx)], ctx)
identifier.type = { kind: 'malleable-type', operand: identifier }
break
case 'variant':
identifier.type = ref.def.variant.type
Expand Down Expand Up @@ -780,6 +774,10 @@ export const resolveMallebleType = (arg: Operand, paramType: VirtualType, ctx: C
const closure = arg.type!.operand
arg.type! = checkResolvedClosureExpr(closure, ctx, arg, paramType)
break
case 'identifier':
// TODO
arg.type! = unknownType
break
default:
unreachable()
}
Expand Down

0 comments on commit 8eb8d76

Please sign in to comment.