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: 3574 Reporter: administrator Assigned to:@mshinwell Status: resolved (set by @mshinwell on 2016-12-08T13:06:27Z) Resolution: fixed Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general) Monitored by:@glondu
Bug description
Hello,
ocamlc ne se plaint pas lorsqu'on linke deux fois le même module. Cela
casse l'abstraction de type, comme le montre l'exemple suivant:
A.mli:
type t
val mk: unit -> t
val compare: t -> t -> int
A.ml:
type t = int
let counter = ref 0
let mk () = incr counter; !counter
let compare = compare
B.ml:
let a = A.mk ()
C.ml:
let a = A.mk () in
Printf.printf "%i\n" (A.compare B.a a)
Normalement, deux objets de type A.t sont égaux (pour A.compare) ss'ils
ont été produits par le même appel à A.mk. Or:
Original bug ID: 3574
Reporter: administrator
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-08T13:06:27Z)
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @glondu
Bug description
Hello,
ocamlc ne se plaint pas lorsqu'on linke deux fois le même module. Cela
casse l'abstraction de type, comme le montre l'exemple suivant:
A.mli:
type t
val mk: unit -> t
val compare: t -> t -> int
A.ml:
type t = int
let counter = ref 0
let mk () = incr counter; !counter
let compare = compare
B.ml:
let a = A.mk ()
C.ml:
let a = A.mk () in
Printf.printf "%i\n" (A.compare B.a a)
Normalement, deux objets de type A.t sont égaux (pour A.compare) ss'ils
ont été produits par le même appel à A.mk. Or:
buzet ~/bug $ ocamlc -o x a.cmo b.cmo a.cmo c.cmo
buzet ~/bug $ ./x
0
Je viens de me faire attraper par ce comportement (une fonction
"forward" qui disparaissait)...
-- Alain
The text was updated successfully, but these errors were encountered: