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

Programmer should be warned when a class define a class with a virtual method m that has an implementation #7040

Closed
vicuna opened this issue Nov 12, 2015 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Nov 12, 2015

Original bug ID: 7040
Reporter: @sbriais
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2015-11-16T10:37:55Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @gasche @diml

Bug description

I was surprised to not get any warning when writing code like the following:

class a =
object
method virtual foo: int
method foo = 42
end

It is probably a mistake to declare a method virtual and give its implementation in the same class.

@vicuna
Copy link
Author

vicuna commented Nov 13, 2015

Comment author: @alainfrisch

See #290

@vicuna
Copy link
Author

vicuna commented Nov 16, 2015

Comment author: @alainfrisch

See discussion on Github. It seems better not to do anything here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants