diff options
| author | Hugo Herbelin | 2019-12-27 13:30:49 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2019-12-27 13:30:49 +0100 |
| commit | 9c74438f09c2dddaa320eccf4d0842c77e3c863d (patch) | |
| tree | 53a3b812bd8c08715e3a9f7b77681f4eb3d51fef /parsing | |
| parent | 4c19baf3a1b0ee9b1e94df4bca29c53125445db8 (diff) | |
| parent | fcd903c299db00d5c8d3e2fa797404eb880b61ac (diff) | |
Merge PR #11315: Ensure that a custom entry cannot be defined twice.
Reviewed-by: herbelin
Reviewed-by: maximedenes
Diffstat (limited to 'parsing')
| -rw-r--r-- | parsing/pcoq.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/parsing/pcoq.ml b/parsing/pcoq.ml index 734dd8ee8a..26afdcb9d5 100644 --- a/parsing/pcoq.ml +++ b/parsing/pcoq.ml @@ -533,6 +533,7 @@ let extend_entry_command (type a) (type b) (tag : (a, b) entry_command) (g : a) try EntryDataMap.find tag !camlp5_entries with Not_found -> EntryData.Ex String.Map.empty in + let () = assert (not @@ String.Map.mem name old) in let entries = String.Map.add name e old in camlp5_entries := EntryDataMap.add tag (EntryData.Ex entries) !camlp5_entries in |
