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: 1616 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Si j'ai le fichier .ml suivant :
test.ml :
class ['a] container id =
object(s:'s)
val mutable id = (id : 'a)
method set (x : 'a) =
x #add_container s
end;;
alors la suite d'opération suivante donne un résulat pour le moins étrange :
moi@debian:/lang/ocaml/test/bug$ ocamlc -i -c test.ml > test.mli_tmp
moi@debian:/lang/ocaml/test/bug$ mv test.mli_tmp test.mli
moi@debian:/lang/ocaml/test/bug$ rm .cm
moi@debian:/lang/ocaml/test/bug$ ocamlc -c test.ml
The implementation test.ml does not match the interface test.cmi:
Class declarations do not match:
class ['a] container :
'a ->
object
constraint 'a = < add_container : < set : 'a -> 'b; .. > -> 'b; .. >
val mutable id : 'a
method set : 'a -> 'b
end
does not match
class ['a] container :
'a ->
object
constraint 'a = < add_container : < set : 'a -> 'b; .. > -> 'b; .. >
val mutable id : 'a
method set : 'a -> 'b
end
One type parameter has type
< add_container : < set : 'a -> 'b; .. > -> 'b; .. > as 'a
but is expected to have type
< add_container : < set : 'c -> 'd; .. > -> 'd; .. > as 'c
il semble que ce soit "juste" un problème d'affichage du type.
Une version similaire sans le
val mutable id = (id : 'a)
compile sans problème....
The text was updated successfully, but these errors were encountered:
Original bug ID: 1616
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Vanicat Remi
Version: 3.06 et cvs
OS:
Submission from: ca-bordeaux-20-28.abo.wanadoo.fr (80.8.92.28)
Bonjour.
Si j'ai le fichier .ml suivant :
test.ml :
class ['a] container id =
object(s:'s)
val mutable id = (id : 'a)
method set (x : 'a) =
x #add_container s
end;;
alors la suite d'opération suivante donne un résulat pour le moins étrange :
moi@debian:
/lang/ocaml/test/bug$ ocamlc -i -c test.ml > test.mli_tmp/lang/ocaml/test/bug$ mv test.mli_tmp test.mlimoi@debian:
moi@debian:
/lang/ocaml/test/bug$ rm .cm/lang/ocaml/test/bug$ ocamlc -c test.mlmoi@debian:
The implementation test.ml does not match the interface test.cmi:
Class declarations do not match:
class ['a] container :
'a ->
object
constraint 'a = < add_container : < set : 'a -> 'b; .. > -> 'b; .. >
val mutable id : 'a
method set : 'a -> 'b
end
does not match
class ['a] container :
'a ->
object
constraint 'a = < add_container : < set : 'a -> 'b; .. > -> 'b; .. >
val mutable id : 'a
method set : 'a -> 'b
end
One type parameter has type
< add_container : < set : 'a -> 'b; .. > -> 'b; .. > as 'a
but is expected to have type
< add_container : < set : 'c -> 'd; .. > -> 'd; .. > as 'c
il semble que ce soit "juste" un problème d'affichage du type.
Une version similaire sans le
val mutable id = (id : 'a)
compile sans problème....
The text was updated successfully, but these errors were encountered: