Skip to content

Commit

Permalink
added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Jun 17, 2024
1 parent b2def57 commit febbf5c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,8 @@ private tuple[rel[loc, IdRole, AType], list[bool]] filterOverloads(rel[loc, IdRo
// The interpreter does not handle this well, so revisit this later
// TODO: maybe check that all upperbounds of type parameters are identical?
// JV: upperbounds need to be glb'ed. If two upperbounds must be made true, then the nearest solution is their
// greatest lowerbound. In practise this means they are indeed identitical 9 out 10 cases.
private AType checkArgsAndComputeReturnType(Expression current, loc scope, AType retType, list[AType] formals, list[Keyword] kwFormals, bool isVarArgs, list[Expression] actuals, keywordArguments, list[bool] identicalFormals, Solver s){
nactuals = size(actuals); nformals = size(formals);
Expand Down Expand Up @@ -815,6 +817,7 @@ private AType computeReturnType(Expression current, loc _src, AType retType, lis
retTypeU = makeUniqueTypeParams(retType, fsuffix);
formalTypesU = makeUniqueTypeParams(formalTypes, fsuffix);
actualTypesU = makeUniqueTypeParams(actualTypes, asuffix);
// TODO: (JV) the initial bindings should be &T => avoid() for all type parameters
try bindings = matchRascalTypeParams(formalTypesU, actualTypesU, bindings);
catch invalidMatch(str reason):
s.report(error(/*i < size(actuals) ? actuals[i] :*/ current, reason));
Expand Down

0 comments on commit febbf5c

Please sign in to comment.