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

scoping of as introduced aliases #3709

Closed
vicuna opened this issue Jul 3, 2005 · 2 comments
Closed

scoping of as introduced aliases #3709

vicuna opened this issue Jul 3, 2005 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 3, 2005

Original bug ID: 3709
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Ethan Aubin
Version: 3.07+2
OS: Solaris
Submission from: c-24-60-21-144.hsd1.ma.comcast.net (24.60.21.144)

Hi, Could the manual could be more explicit about what constites "the remaining
part of the type" in the Aliased and recursive types section of chapter 6.4. I
was surprised by the following behavior:

class foo =
object
val x: ([X] as 'a) = X
val y: ([Y] as 'a) = Y
end

which fails indicating that the scope of 'a is the whole class and not the field
spec as I had originally guess. Cheers -- ethan.aubin@pobox.com

@vicuna
Copy link
Author

vicuna commented Jul 12, 2005

Comment author: administrator

I've added a comment stating that aliases have generally the same scope as named
type variables. Note however that there are exceptions to this rule; the whole
definition should be rethought, rather than explaining in detail the current
unsatisfactory situation...

Jacques

@vicuna
Copy link
Author

vicuna commented Jul 12, 2005

Comment author: administrator

Really should do something about the scope of named type variables... JG

@vicuna vicuna closed this as completed Jul 12, 2005
@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