Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006104OCamlOCaml generalpublic2013-07-30 00:102013-07-30 06:46
Reportersliquister 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.00.1 
Target VersionFixed in Version4.01.0+dev 
Summary0006104: wrong warning 37 with private types
DescriptionI 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0010007)
gasche (developer)
2013-07-30 06:46

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

- Issue History
Date Modified Username Field Change
2013-07-30 00:10 sliquister New Issue
2013-07-30 06:46 gasche Note Added: 0010007
2013-07-30 06:46 gasche Status new => resolved
2013-07-30 06:46 gasche Fixed in Version => 4.01.0+dev
2013-07-30 06:46 gasche Resolution open => fixed
2013-07-30 06:46 gasche Assigned To => gasche


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker