Skip to content

Unused open warning with exception pattern #350

@aantron

Description

@aantron
module M = struct exception E end
let _ =
  match () with
  | () -> ()
  | M.(exception (E | Exit)) -> ()

generates instrumentation that includes the case | M.(Exit), which then triggers

File "test.ml", line 5, characters 2-26:
5 | | M.(exception (E | Exit)) -> (
      ^^^^^^^^^^^^^^^^^^^^^^^^
Error (warning 33): unused open M.

The solution is probably to suppress warning 33 in the suppression list here:

{attr_name = Location.mkloc "ocaml.warning" loc;
attr_payload = PStr [[%stri "-4-8-9-11-26-27-28"]];
attr_loc = loc}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions