You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7869 Reporter:@paurkedal Status: new Resolution: open Priority: normal Severity: minor Version: 4.07.1 Category: typing Monitored by:@nojb@gasche
Bug description
The program
module type S=sigtype+'a tvalf : ([< `A] as'a) t -> 'atendmoduleM : Swithtype 'a t := 'a =structletfx= x
end
fails with
File "test.ml", line 5, characters 36-60:
Error: Signature mismatch:
Modules do not match:
sig val f : 'a -> 'a end
is not included in
sig val f : [< `A ] -> [< `A ] end
Values do not match:
val f : 'a -> 'a
is not included in
val f : [< `A ] -> [< `A ]
File "test.ml", line 3, characters 2-34: Expected declaration
File "test.ml", line 6, characters 6-7: Actual declaration
for OCaml 4.06.1, 4.07.1, and current master (fd5c692). As seen, the constraint between the argument and result type of f is lost. This does not happen if the argument is not constrained to a polymorphic variant, including when constrained to and object type like < >.
The text was updated successfully, but these errors were encountered:
I could not reproduce on trunk or 4.08, here is the output of ocamlc -c -i on the example above:
module type S=sigtype+'a t valf : ([< `A ] as'a) t -> 'atendmoduleM : sigvalf : ([< `A ] as'a) -> 'aend
I don't know what would have changed this, nor do I have the time to look into it right now.
I'm closing, but I think it would be good to know what happened (I'm going to keep a note to have a look at this, but it might be a while before I do, so feel free to investigate!)
Original bug ID: 7869
Reporter: @paurkedal
Status: new
Resolution: open
Priority: normal
Severity: minor
Version: 4.07.1
Category: typing
Monitored by: @nojb @gasche
Bug description
The program
fails with
for OCaml 4.06.1, 4.07.1, and current master (fd5c692). As seen, the constraint between the argument and result type of f is lost. This does not happen if the argument is not constrained to a polymorphic variant, including when constrained to and object type like < >.
The text was updated successfully, but these errors were encountered: