Commit cc1de11
authored
make Ast_mapper iterate over all locations inside Longident.t (#2737)
These locations, which are new in 5.4, are sometimes traversed (e.g. Pexp_setfield) and
sometimes not (e.g. Pexp_field). So clearly a bug.
The fix is concretely:
- change map_loc to map over both fields `{ loc; txt }` of `Location.loc`
- propagate the change, ie change `map_loc` to `map_string_loc`,
`map_string_opt_loc` or `map_loc_lid` depending on the type. All occurrences
of the latter are bug fixes.1 parent f077f22 commit cc1de11
2 files changed
+68
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
0 commit comments