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: 459 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
ocamlc plante sur le fichier suivant, au moment de la definition de Try2_.obj:
class virtual[ 't ] setoid =
object(sobj:'self)
method different (x:'t) (y:'t)= not (sobj#equal x y )
method virtual element: 't
method virtual equal: ('t)->('t)->bool
end;;
class [ 't , 'f, 'spec_f ] bla((f):('spec_f))=
object(sobj:'self)
constraint 'spec_f= 'self -> ('f, 't, 'self)#foo2
constraint 't = int
inherit [ 't ]setoid
method printb (a:'t)= string_of_int a
val mutable my_spec=None
method my_spec = match my_spec with
None -> failwith "not initialized"
| Some s -> s
method element= (sobj#my_spec)#my_foo
method equal= (=)
initializer
my_spec <- Some (f (sobj))
end;;
module Try2_ =
struct
type f_t = bool
type fspec = stype -> (bool,rep,stype) foo2
and rep = int
and stype = (rep, f_t,fspec)bla
let obj = (new bla(fun f ->new foo2(f)) :>stype)
end
;;
Le message obtenu ne facilite pas la recherche de l'erreur:
Uncaught exception: File "typing/ctype.ml", line 0, characters 71629-71641:
Assertion failed
A priori, le probleme se trouve dans la resolution des contraintes de types: si
on definit
avec deux parametres de types supplementaires (qu'on retrouve aussi dans la
definition de bla), et que Try2_.stype prend la forme
(...)blatype, la compilation s'effectue sans probleme, et les objets crees ont
le type (et le comportement) attendu.
The text was updated successfully, but these errors were encountered:
Original bug ID: 459
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Virgile Prevosto
Version: 3.01+1 (2001-04-19)
OS: RedHat 6.2
Submission from: etna.lip6.fr (132.227.83.203)
ocamlc plante sur le fichier suivant, au moment de la definition de Try2_.obj:
class virtual[ 't ] setoid =
object(sobj:'self)
method different (x:'t) (y:'t)= not (sobj#equal x y )
method virtual element: 't
method virtual equal: ('t)->('t)->bool
end;;
class [ 't , 'a, 'spec_a ] foo2((a):('spec_a))=
object(sobj:'self)
constraint 'spec_a= ( 'a)#setoid
constraint 't = bool
inherit [ 't ]setoid
method equal= (=)
method element= false
method my_foo= 2
end;;
class [ 't , 'f, 'spec_f ] bla((f):('spec_f))=
object(sobj:'self)
constraint 'spec_f= 'self -> ('f, 't, 'self)#foo2
constraint 't = int
inherit [ 't ]setoid
method printb (a:'t)= string_of_int a
val mutable my_spec=None
method my_spec = match my_spec with
None -> failwith "not initialized"
| Some s -> s
method element= (sobj#my_spec)#my_foo
method equal= (=)
initializer
my_spec <- Some (f (sobj))
end;;
module Try2_ =
struct
type f_t = bool
type fspec = stype -> (bool,rep,stype) foo2
and rep = int
and stype = (rep, f_t,fspec)bla
let obj = (new bla(fun f ->new foo2(f)) :>stype)
end
;;
Le message obtenu ne facilite pas la recherche de l'erreur:
Uncaught exception: File "typing/ctype.ml", line 0, characters 71629-71641:
Assertion failed
A priori, le probleme se trouve dans la resolution des contraintes de types: si
on definit
class type [ 't , 'f, 'spec_f ,'argt_f,'f_a] blatype =
object ('self)
constraint 'spec_f= 'argt_f -> ('f, 'f_a, 'argt_f)foo2
constraint 'argt_f = 'f_a #setoid
constraint 't = int
inherit [ 't ]setoid
method printb: ('t)->string
method my_spec: (bool, 't, 'self)foo2
method element: 't
method equal: ('t)->('t)->bool
end
avec deux parametres de types supplementaires (qu'on retrouve aussi dans la
definition de bla), et que Try2_.stype prend la forme
(...)blatype, la compilation s'effectue sans probleme, et les objets crees ont
le type (et le comportement) attendu.
The text was updated successfully, but these errors were encountered: