Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better ghost locs for default parameters.
When translating a parse tree to the corresponding typed tree a function definition fun ?(arg = foo) -> e is translated to (using ocaml syntax): fun *opt* -> let arg = match *opt* with | Some sth -> sth | None -> foo in e Currently the match term is given the location of the whole function term (including e), which is incorrect and trips cmt-based tools that work based on location. This patch gives a location to the match construct corresponding to the fragment 'arg = foo' in the original program.
- Loading branch information