Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: generating invalid ocaml syntax. #2536

Closed
nojb opened this issue Apr 9, 2024 · 6 comments
Closed

BUG: generating invalid ocaml syntax. #2536

nojb opened this issue Apr 9, 2024 · 6 comments

Comments

@nojb
Copy link
Contributor

nojb commented Apr 9, 2024

ocamlformat.0.26.1 chokes on:

let _ =
  if x && try () with _ -> () then ()

when .ocamlformat contains

ocp-indent-compat
@Julow
Copy link
Collaborator

Julow commented Apr 9, 2024

Thanks for the report. The bug doesn't occur on the main branch, could you check ? This seems to be fixed since #2445.

@nojb
Copy link
Contributor Author

nojb commented Apr 9, 2024

Thanks for the report. The bug doesn't occur on the main branch, could you check ? This seems to be fixed since #2445.

I tried master but now I got another BUG :)

let _ =
  try
    ()
  with _ ->
    (match () with _ -> ())

with

indicate-multiline-delimiters=closing-on-separate-line

@nojb
Copy link
Contributor Author

nojb commented Apr 9, 2024

And another:

let _ =
  try () with _ ->
  try () with _ -> () in
()

also with

indicate-multiline-delimiters=closing-on-separate-line

@Julow
Copy link
Collaborator

Julow commented Apr 11, 2024

Thanks! This is hopefully a recent bug. Should be fixed in #2537

@nojb
Copy link
Contributor Author

nojb commented Apr 12, 2024

Thanks! This is hopefully a recent bug. Should be fixed in #2537

Thanks, this fixes it indeed, and the original bug reported is fixed in master already. Closing. Thanks!

@nojb nojb closed this as completed Apr 12, 2024
@Julow
Copy link
Collaborator

Julow commented Apr 12, 2024

Thanks for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants