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: 499 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hi,
when I compile the attached program with -i option I get
class ['a] top_pre_iface_class : string -> 'a -> ['a] top_pre_iface_type
but
new top_pre_iface_class "a"
does not have type 'a -> ['a] top_pre_iface_type
I used Objective Caml compiler, version 3.02 on Linux 2.2.18.
Bye,
Hendrik
type ('cl) top_pre_types =
| Class of 'cl * ('cl) top_pre_argument_type list
and ('cl) top_pre_argument_type =
| TypeArgument of (('cl) top_pre_types)
type ('cl) top_pre_component_type =
'cl * ('cl) top_pre_argument_type list
class type ['super_class] top_pre_iface_type
object
val name :
string
method get_name :
string
method add_ancestor :
'super_class -> unit
method get_ancestors :
'super_class list
method add_component :
('super_class) top_pre_component_type -> unit
method get_components :
('super_class) top_pre_component_type list
end
class type top_iface_type
= [top_iface_type] top_pre_iface_type
type top_top_types = (top_iface_type) top_pre_types
type top_output_types =
top_top_types
type top_argument_type =
(top_iface_type) top_pre_argument_type
when I compile the attached program with -i option I get
class ['a] top_pre_iface_class : string -> 'a -> ['a] top_pre_iface_type
but
new top_pre_iface_class "a"
does not have type 'a -> ['a] top_pre_iface_type
Yes, this is a bug that you reported long ago (#2325)
But checking this is rather complicated: you have to verify that hidden types
have not changed, but this is OK for non-hidden ones.
So, yes, we keep it mind, but do not hold your breath.
Original bug ID: 499
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hi,
when I compile the attached program with -i option I get
class ['a] top_pre_iface_class : string -> 'a -> ['a] top_pre_iface_type
but
new top_pre_iface_class "a"
does not have type 'a -> ['a] top_pre_iface_type
I used Objective Caml compiler, version 3.02 on Linux 2.2.18.
Bye,
Hendrik
type ('cl) top_pre_types =
| Class of 'cl * ('cl) top_pre_argument_type list
and ('cl) top_pre_argument_type =
| TypeArgument of (('cl) top_pre_types)
type ('cl) top_pre_component_type =
'cl * ('cl) top_pre_argument_type list
class type ['super_class] top_pre_iface_type
object
end
class type top_iface_type
= [top_iface_type] top_pre_iface_type
type top_top_types = (top_iface_type) top_pre_types
type top_output_types =
top_top_types
type top_argument_type =
(top_iface_type) top_pre_argument_type
let eq_string (s1 : string) (s2 : string) = s1 = s2
let rec eq_top_types t1 t2 = t1 == t2 or match t1,t2 with
| Class(cl1, args1),Class(cl2, args2) ->
(eq_string cl1#get_name cl2#get_name)
&& (List.length args1 = List.length args2)
&& (List.for_all2 eq_top_args args1 args2)
and eq_top_args (a1 : top_argument_type) (a2 : top_argument_type)
= match a1,a2 with
| TypeArgument typ1, TypeArgument typ2 ->
eq_top_types typ1 typ2
class
['super_class] top_pre_iface_class
name
first_anc
:
['super_class] top_pre_iface_type
= object (s : 'self)
end
let o = new top_pre_iface_class "a"
(*** Local Variables: )
( version-control: t )
( compile-command: "ocamlc -i eq_args_bug.ml" )
( kept-new-versions: 10 )
( delete-old-versions: t )
( End: ***)
The text was updated successfully, but these errors were encountered: