Skip to content

Commit

Permalink
Fix #304
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Nov 15, 2024
1 parent 8db4df1 commit d9fd205
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,10 @@ export const getNodeDefinition = (environment: Environment) => (node: Node): Nod
}

export const superMethodDefinition = (superNode: Super, methodModule: Module): Method | undefined => {
const currentMethod = superNode.ancestors.find(is(Method))!
function isValidMethod(node: Node): node is Method {
return node.is(Method) && node.name !== CLOSURE_EVALUATE_METHOD
}
const currentMethod = superNode.ancestors.find(isValidMethod)!
return methodModule.lookupMethod(currentMethod.name, superNode.args.length, { lookupStartFQN: currentMethod.parent.fullyQualifiedName })
}

Expand Down
1 change: 0 additions & 1 deletion test/interpreter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ describe('Wollok Interpreter', () => {
expect(errored).to.be.false
})


})

describe('DirectedInterpreter', () => {
Expand Down

0 comments on commit d9fd205

Please sign in to comment.