Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong warning 37 with private types #6104

Closed
vicuna opened this issue Jul 29, 2013 · 1 comment
Closed

wrong warning 37 with private types #6104

vicuna opened this issue Jul 29, 2013 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 29, 2013

Original bug ID: 6104
Reporter: @sliquister
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2015-12-11T18:21:18Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.00.1
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

I think the example below is clearer that trying to explain with words. The problem is that the constructor that the compiler complains about doesn't exist.

Steps to reproduce

$ cat a.ml
module Ml : sig end = struct
module A : sig
type t = private Constr
val t : t
end = struct
type t = Constr
let t = Constr
end

include (A : module type of A with type t := A.t)

let A.Constr = t
end
$ ocamlopt -version
4.00.1
$ ocamlopt -w +a a.ml
File "a.ml", line 10, characters 37-50:
Warning 37: constructor Constr is never used to build values.
Its type is exported as a private type.

@vicuna
Copy link
Author

vicuna commented Jul 30, 2013

Comment author: @gasche

In old versions of 4.01+dev, this example was rejected with an error, but the example is now accepted, without any warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants