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: 1606 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
cafe[14:17]%cat > bug.ml
class type ['a] o = object end
class type c = object method m : 'a. 'a #o as 'a end
cafe[14:17]%ocamlc -i bug.ml
class type ['a] o = object end
class type c = object method m : 'a #o as 'a end
cafe[14:17]%ocamlc -i bug.ml > bug.mli
cafe[14:17]%ocamlc bug.mli
File "bug.mli", line 2, characters 10-48:
Some type variables are unbound in this type:
class type c = object method m : 'a #o as 'a end
The method m has type 'a #o as 'a where .. is unbound
The text was updated successfully, but these errors were encountered:
class type ['a] o = object end
class type c = object method m : 'a #o as 'a end
Some type variables are unbound in this type:
class type c = object method m : 'a #o as 'a end
The method m has type 'a #o as 'a where .. is unbound
Well spotted: aliases were not allowed in implicit polymorphic method
types. This is now fixed.
Note that they obey different scoping rules compared to normal types:
variables and aliases introduced in implicit types are local to this
type; normally they are shared in the whole expression.
Original bug ID: 1606
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
cafe[14:17]%cat > bug.ml
class type ['a] o = object end
class type c = object method m : 'a. 'a #o as 'a end
cafe[14:17]%ocamlc -i bug.ml
class type ['a] o = object end
class type c = object method m : 'a #o as 'a end
cafe[14:17]%ocamlc -i bug.ml > bug.mli
cafe[14:17]%ocamlc bug.mli
File "bug.mli", line 2, characters 10-48:
Some type variables are unbound in this type:
class type c = object method m : 'a #o as 'a end
The method m has type 'a #o as 'a where .. is unbound
The text was updated successfully, but these errors were encountered: