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: 4522 Reporter:@mmottl Status: closed (set by @damiendoligez on 2012-09-15T10:31:05Z) Resolution: fixed Priority: normal Severity: minor Version: 3.10.1 Target version: 4.00.1+dev Fixed in version: 3.12.0 Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Monitored by:@murmour@mmottl
Bug description
The following valid code cannot be compiled when preprocessed with Camlp4:
module type S = sig val f : ?x : 'a -> unit -> unit end
module M : S = struct let f ?x:_ () = () end
Compiler output (with ocamlc -pp camlp4o foo.ml):
File "foo.ml", line 2, characters 15-44:
Signature mismatch:
Modules do not match: sig val f : 'a -> unit -> unit end is not included in S
Values do not match:
val f : 'a -> unit -> unit
is not included in
val f : ?x:'a -> unit -> unit
The label of the ignored optional argument obviously got deleted by Camlp4 as evidenced by the output when pretty-printing with "camlp4o -printer o foo.ml":
module type S = sig val f : ?x: 'a -> unit -> unit end
module M : S = struct let f _ () = () end
Regards,
Markus
The text was updated successfully, but these errors were encountered:
Original bug ID: 4522
Reporter: @mmottl
Status: closed (set by @damiendoligez on 2012-09-15T10:31:05Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.1
Target version: 4.00.1+dev
Fixed in version: 3.12.0
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @murmour @mmottl
Bug description
The following valid code cannot be compiled when preprocessed with Camlp4:
module type S = sig val f : ?x : 'a -> unit -> unit end
module M : S = struct let f ?x:_ () = () end
Compiler output (with ocamlc -pp camlp4o foo.ml):
File "foo.ml", line 2, characters 15-44:
Signature mismatch:
Modules do not match: sig val f : 'a -> unit -> unit end is not included in S
Values do not match:
val f : 'a -> unit -> unit
is not included in
val f : ?x:'a -> unit -> unit
The label of the ignored optional argument obviously got deleted by Camlp4 as evidenced by the output when pretty-printing with "camlp4o -printer o foo.ml":
module type S = sig val f : ?x: 'a -> unit -> unit end
module M : S = struct let f _ () = () end
Regards,
Markus
The text was updated successfully, but these errors were encountered: