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: 1725 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Original bug ID: 1725
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.06
OS: Linux (RedHat 7.2)
Submission from: 132.227.83.215 (132.227.83.215)
Entering the following code at toplevel results in a Stack Overflow, and exits
the toplevel:
class mother = object
end;;
class daughter =
object
inherit mother
method get_x = 0
end;;
let f (l : #mother list ) = List.tl l;;
let m1 = new mother ;;
let m2 = new daughter;;
f [m1];;
f [m2];;
[m1; m2];; (* not well-typed. *)
[m1;(m2 :>mother)];;
Stranger than that, if you omit the calls to f or the erroneous definition [m1;
m2], everything works well...
The text was updated successfully, but these errors were encountered: