Skip to content

Commit cc1de11

Browse files
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

File tree

2 files changed

+68
-65
lines changed

2 files changed

+68
-65
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ profile. This started with version 0.26.0.
3737
end
3838
```
3939

40+
- `Ast_mapper` now iterates on *all* locations inside of Longident.t,
41+
instead of only some.
42+
(#2737, @v-gb)
43+
4044
### Internal
4145

4246
- Added information on writing tests to `CONTRIBUTING.md` (#2838, @WardBrian)
@@ -60,6 +64,7 @@ profile. This started with version 0.26.0.
6064
end
6165
end
6266
```
67+
6368
## 0.28.1
6469

6570
### Highlight

0 commit comments

Comments
 (0)