Skip to content

Commit

Permalink
Draft of the solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Jun 14, 2023
1 parent 5e1392a commit 0ea6f75
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,15 @@ Function resolveFunction(UnresolvedSymbol symbol, Type selfTpe, MethodResolverNo
Type any = ctx.getBuiltins().any();
Function anyFun = symbol.getScope().lookupMethodDefinition(any, symbol.getName());
if (anyFun != null) {
function = anyFun;
return anyFun;
}
} else if (selfTpe == ctx.getBuiltins().any().getEigentype()) {
// If `selfTpe` is Any.type (Any eigenType), make sure that the function is resolved
// as an instance method.
Type any = ctx.getBuiltins().any();
Function anyInstanceFun = symbol.getScope().lookupMethodDefinition(any, symbol.getName());
if (anyInstanceFun != null) {
return anyInstanceFun;
}
}
return function;
Expand Down

0 comments on commit 0ea6f75

Please sign in to comment.