-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ocamlc -i produces incorrect result #4791
Description
Original bug ID: 4791
Reporter: jerhoud
Status: acknowledged (set by @damiendoligez on 2009-05-15T15:09:02Z)
Resolution: open
Priority: low
Severity: feature
Version: 3.10.2
Target version: later
Category: typing
Has duplicate: #6323 #7402
Related to: #6416 #6634 #6654 #7458
Parent of: #6587
Bug description
cat a.ml
(* begin of a.ml *)
type t = A
module B =
struct
type t = B
let f A = B
end
(* end of a.ml *)
ocamlc -i a.ml
type t = A
module B : sig type t = B val f : t -> t end
The type of f is incorrect, it should be something like "val f : A.t -> B.t" except that there seems to be no way of actually writing a correct signature for module B (both A.t and B.t are unbound at this stage).
On the other hand, other definitions using f seem to be typed correctly.
I may admit that there is no way to solve this problem, but ocamlc -i should report an error instead of producing an incorrect result.