Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007719OCamlcompiler driverpublic2018-02-02 11:382018-02-02 15:20
Reporterauthchir 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Platformamd64OSlinuxOS Version4.4.0-43-Microso
Product Version4.06.0 
Target VersionFixed in Version 
Summary0007719: Deprecated annotation on let-binding does not trigger
DescriptionAs explored in this [Stackoverflow question][1], a let-binding annotated with a `deprecated` annotation does not trigger any warning. But the annotation on type definition and constructors does work.

[1] https://stackoverflow.com/q/48579580/823955 [^]
Steps To ReproduceGiven the following file `main.ml`:

    let foo = (fun x -> x) [@@deprecated]
    type t =
      | A [@deprecated]
      | B [@deprecated]
      [@@deprecated]

    let _ = foo 0
    let _ = A
    let f (x : t) = x

The compilation output two warnings, while three would be expected:

    $ ocamlc -w +3 main.ml
    File "main.ml", line 8, characters 8-9:
    Warning 3: deprecated: A
    File "main.ml", line 9, characters 11-12:
    Warning 3: deprecated: t
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-02-02 11:38 authchir New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker