Skip to content

Conversation

@let-def
Copy link

@let-def let-def commented Nov 26, 2025

Eol_compat assumes that the excluded locations are non‑overlapping and strictly increasing. This assumption does not hold in all cases, as illustrated by the following sentence:

object method ! x1 : type x2 . x3 * {%ext|s|} = X4 end

The proposed change does not introduce a regression: it only triggers for situations that were not previously covered. However, I do not fully understand Eol_compat, so I cannot guarantee that it behaves as intended on sentences that were failing before.

This fix is a prerequisite for integrating the fuzzer, because the current issue makes ocamlformat crash and prevents further analysis. (Exceptions are usually caught by the ocamlformat driver and turned into an error message, not this one.)

Here is a sample sentence triggering the problem:

     object method ! x1 : type x2 . x3 * {%ext|s|} = X4 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant