Apply a given forking function to produce an array of forked environments. @param candidates The list of candidates for which the environment is forked where each candidate is forked into a new environment. @param fn The forking function which takes a given callable
(List<Decl.Callable> candidates, Function<Decl.Callable, Typing.Row> fn)
| 3372 | * @return |
| 3373 | */ |
| 3374 | public Typing.Row[] fork(List<Decl.Callable> candidates, Function<Decl.Callable, Typing.Row> fn) { |
| 3375 | Typing.Row[] constraints = new Typing.Row[candidates.size()]; |
| 3376 | for (int i = 0; i != candidates.size(); ++i) { |
| 3377 | constraints[i] = fn.apply(candidates.get(i)); |
| 3378 | } |
| 3379 | // Remove any invalid environments which have arisen. |
| 3380 | return ArrayUtils.removeAll(constraints, null); |
| 3381 | } |
| 3382 | |
| 3383 | public Type refine(Type declared, Type selector) { |
| 3384 | // FIXME: this method is a hack for now really, until such time as I resolve |
no test coverage detected