ocaml / ocaml

The core OCaml system: compilers, runtime system, base libraries
https://ocaml.org
Other
5.5k stars 1.11k forks source link

Enable changing warnings in type declarations. #13532

Open gaganchandan opened 1 month ago

gaganchandan commented 1 month ago

Add the ability to locally suppress warnings when declaring types. For example, warnings can now be disabled as seen in the second line of the following program.

type t = A [@deprecated "blah"]

type t2 = t = A [@@warning "-3"]

This PR resolves issue #12301.

NickBarnes commented 1 month ago

Please update this PR title and description to be more informative, so it's not necessary to click through to the issue (e.g. when scanning a list of PRs) to find out what this is about.

gaganchandan commented 1 month ago

@NickBarnes I've updated it. Sorry for the inconvenience.