Skip to content

Commit

Permalink
Look for overloads until reachable defs are exhausted.
Browse files Browse the repository at this point in the history
  • Loading branch information
toinehartman committed Oct 25, 2024
1 parent e10a0dd commit 8469735
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ set[loc] rascalGetOverloadedDefs(WorkspaceInfo ws, set[loc] defs, MayOverloadFun
defPaths = defPaths o allDefs;
}

solve(overloadedDefs) {
rel[loc from, loc to] reachableDefs = ident(overloadedDefs) o defPaths;

set[loc] reachableDefs = defPaths[overloadedDefs];
solve(overloadedDefs, reachableDefs) {
overloadedDefs += {d
| loc d <- reachableDefs<1>
| loc d <- reachableDefs
, mayOverloadF(overloadedDefs + d, ws.definitions)
};
reachableDefs = defPaths[overloadedDefs];
}

return overloadedDefs;
Expand Down

0 comments on commit 8469735

Please sign in to comment.