odoc icon indicating copy to clipboard operation
odoc copied to clipboard

odoc cannot handle alerts for type aliases

Open favonia opened this issue 1 year ago • 2 comments

odoc seems to have trouble handling deprecation alerts attached to type aliases, for example this one:

type int2 = int [@@ocaml.alert deprecated "Just use int"]

Here's odoc's complaint:

File "src/Test.mli", line 1, characters 16-57:
Warning: Alert deprecated not expected here.

However, the OCaml compiler seems to accept and handle such an alert perfectly.

favonia avatar Oct 31 '24 12:10 favonia

Thanks for reporting this! It does indeed look like our issue. I'll take a look and see what's required to fix this.

jonludlam avatar Nov 13 '24 13:11 jonludlam

I encountered this same issue

hhugo avatar Aug 01 '25 09:08 hhugo