Skip to content

Commit f8b6a44

Browse files
committed
make Ast_mapper iterate over all locations inside Longident.t
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 809492a commit f8b6a44

File tree

2 files changed

+71
-65
lines changed

2 files changed

+71
-65
lines changed

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ Items marked with an asterisk (\*) are changes that are likely to format
44
existing code differently from the previous release when using the default
55
profile. This started with version 0.26.0.
66

7+
## unreleased
8+
9+
### Fixed
10+
11+
- `Ast_mapper` now iterates on *all* locations inside of Longident.t,
12+
instead of only some.
13+
(#2737, @v-gb)
14+
715
## 0.28.1
816

917
### Highlight

0 commit comments

Comments
 (0)