Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003574OCaml~DO NOT USE (was: OCaml general)public2005-04-01 15:412016-12-08 14:06
Reporteradministrator 
Assigned Toshinwell 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003574: Linker deux fois le même_module
DescriptionHello,

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

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016878)
shinwell (developer)
2016-12-08 14:06

This appears to have been fixed (warning 31).

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue
2005-12-15 15:22 doligez Severity minor => feature
2005-12-15 15:22 doligez Description Updated
2016-12-08 14:06 shinwell Note Added: 0016878
2016-12-08 14:06 shinwell Status acknowledged => resolved
2016-12-08 14:06 shinwell Resolution open => fixed
2016-12-08 14:06 shinwell Assigned To => shinwell
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker