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: 5057 Reporter:@ygrek Status: closed (set by @garrigue on 2010-05-21T01:27:44Z) Resolution: fixed Priority: normal Severity: minor Version: 3.11.2 Fixed in version: 3.12.0+dev Category: ~DO NOT USE (was: OCaml general)
Bug description
$ cat bug.ml
module TT = struct
module IntSet = Set.Make(struct type t = int let compare = compare end)
end
let () =
let f flag =
let module T = TT in
let _ = match flag with A -> 0 | B r -> r in
let _ = match flag with A -> T.IntSet.mem | B r -> r in
()
in
f ()
There was a bug in the handling of levels inside polymorphic variant fields.
This is now fixed for 3.12.
Note that your report helped discover a more serious problem, where the following
code was wrongly accepted. Thank you very much.
let f flag =
let module T = Set.Make(struct type t = int let compare = compare end) in
let _ = match flag with A -> 0 | B r -> r in
let _ = match flag with A -> T.mem | B r -> r in
()
Original bug ID: 5057
Reporter: @ygrek
Status: closed (set by @garrigue on 2010-05-21T01:27:44Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.2
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)
Bug description
$ cat bug.ml
module TT = struct
module IntSet = Set.Make(struct type t = int let compare = compare end)
end
let () =
let f flag =
let module T = TT in
let _ = match flag with
A -> 0 |
B r -> r inlet _ = match flag with
A -> T.IntSet.mem |
B r -> r in()
in
f ()
$ ocamlc -c bug.ml
Fatal error: exception Ctype.Unify(_, _)
$ ocamlc -version
3.11.2
Additional information
This is a minimized example, originally occurred in real sensible code.
Also reported to fail in 3.12.0+dev17
The text was updated successfully, but these errors were encountered: