Skip to content

OCaml 4.01.0+dev1_2012-03-31 warning 37 maybe a little too strict #5594

@vicuna

Description

@vicuna

Original bug ID: 5594
Reporter: monate
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2012-04-18T12:40:33Z)
Resolution: fixed
Priority: normal
Severity: minor
Category: typing

Bug description

Hi,
Consider
==f.ml===
type _t = Empty

==f.mli==
(* Nothing is exported *)

Compilation results are:

$ ocamlc -w [email protected] -c foo.mli
$ ocamlc -w [email protected] -c foo.ml
File "foo.ml", line 2, characters 5-15:
Warning 37: unused constructor Empty.
File "foo.ml", line 1:
Error: Error-enabled warnings (1 occurrences)

As the name of the type contains a leading '_' I would not expect a warning about its unused constructors.
Is there a rationale behind this behaviour?
Regards,
Benjamin.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions