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

instance variables masked by values #4970

Closed
vicuna opened this Issue Feb 4, 2010 · 1 comment

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Feb 4, 2010

Original bug ID: 4970
Reporter: turpin
Status: closed (set by @garrigue on 2010-02-04T09:10:27Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 3.11.0
Fixed in version: 3.11.2+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

The following error seems surprising to me. The error message at least is perfectible. In fact, I even expected the x to be still visible as a field (thus making this example legal) but maybe this would bee too confusing.

class c = object
val mutable x = ()
method set = let x = () in x <- x
end;;

Error: Unbound instance variable x

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Feb 4, 2010

Comment author: @garrigue

Fixed the error message.
Indeed this was a bad example of reusing an error message for a different problem...

@vicuna vicuna closed this Feb 4, 2010

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.