ocamlformat icon indicating copy to clipboard operation
ocamlformat copied to clipboard

Bug: Crash with immediate objects

Open gcluzel opened this issue 3 years ago • 0 comments

Hi all,

I use the following .ocamlformat:

profile=default
ocaml-version=4.14.0

When I try to apply it on this code:

let () =
  f
    (object 
       method m x = x
    end
    [@xxx] )

ocamlformat crashes.

It seems that it comes from the attribute [@xxx] and/or the function call because if I remove one of them I do not have a crash anymore.

Also, if I use an older ocaml-version I do not have the crash anymore.

gcluzel avatar Aug 16 '22 12:08 gcluzel