Skip to content

Commit

Permalink
Check impl: missing body
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Sep 10, 2024
1 parent 00241c7 commit e063b13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/phase/impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export const checkImpl = (node: AstNode, ctx: Context): void => {
addError(ctx, genericError(ctx, node.identifier, msg))
return
}
if (!im.block) {
const msg = `method \`${im.name.value}\` is missing body`
addError(ctx, genericError(ctx, im, msg))
}
const traitMethod = traitMethods.find(m => m.name.value === im.name.value)
if (!traitMethod) {
const msg = `method \`${im.name.value}\` not found in trait \`${traitDef.name.value}\``
Expand Down

0 comments on commit e063b13

Please sign in to comment.