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: 3 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
#classtype ['a] cta =objectvala_val : 'amethodb : intend;;
#class ['a] ca (a:'a) : ['a] cta =object val a_val = a method b = a_val#get +5 end;;
into the toplevel, the system derives the type
class['a] ca : 'a -> ['a] cta
IMO this is wrong, because there must be a constraint for the type
parameter of class ca (the constraint becomes visible, if the
type annotation ['a] cta is left out). The problem becomes even
more apparent, when the system derives for
#moduleM=structclass ['a] ca (a:'a) : ['a] cta =object val a_val = a method b = a_val#get +5end end ;;
the type
moduleM : sigclass ['a] ca : 'a -> ['a] cta end
because
#moduletypeMT=sigclass ['a] ca : 'a -> ['a] cta end;;
#moduleM : MT=structclass ['a] ca (a:'a) : ['a] cta =object val a_val = a method b = a_val#get +5end end ;;
produces an error.
The text was updated successfully, but these errors were encountered:
I have finally closed #2325.
The fix was much simpler than what I thought, but it is somehow weak:
all classes whose parameters have constraints will not be abbreviated,
independently of wether the abbreviation is correct or not.
Original bug ID: 3
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Hendrik Tews
Version: 2.02
OS:
Submission from: estephe.inria.fr (128.93.11.95)
Submitted by: xleroy
Hi,
if I type
into the toplevel, the system derives the type
IMO this is wrong, because there must be a constraint for the type
parameter of class ca (the constraint becomes visible, if the
type annotation ['a] cta is left out). The problem becomes even
more apparent, when the system derives for
the type
because
produces an error.
The text was updated successfully, but these errors were encountered: