Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type printing bug : polymorphic method #8073

Closed
vicuna opened this issue Mar 19, 2003 · 2 comments
Closed

type printing bug : polymorphic method #8073

vicuna opened this issue Mar 19, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 19, 2003

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

@vicuna
Copy link
Author

vicuna commented Mar 20, 2003

Comment author: administrator

Fixed by JG 2003-03-20

@vicuna vicuna closed this as completed Mar 20, 2003
@vicuna
Copy link
Author

vicuna commented Mar 20, 2003

Comment author: administrator

From: lvibert@irisa.fr

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.

    Jacques

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant