-
Notifications
You must be signed in to change notification settings - Fork 531
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
Added parse-only support for pure virtual methods #469
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Srinivasan Venkataramanan <[email protected]>
199cf60
to
b7f7e92
Compare
See my comments in #468. Do we also need a test that verify this is parsed correctly? What about failing test when they forget to define the method? I'm making this a draft because I do not think it is ready to commit yet. |
On "failing test" - a test can be written and added to regression, however the infrastructure needed to enforce this feature needs to be developed and am not sure if it can be done in parse.y alone - sure we can add a make_pure_virtual in property_qual.h But to really ensure that pure virtual is implemented in a concrete/derived class, will require multiple file parsing and what I added for now is a start to that journey. Also I remember reading that Icarus today does not really check/do-the-right-thing for:
Hence it will be harder to do these checks at this stage I guess. The best we can do is to add a clear warning. Am not in a hurry to push this tiny check-in/PR, but rather saying we have to take smaller steps - IMHO. Thanks |
Can you rebase this to the current master? The base of this branch does not include the updated regression test suite, and also missing a lot of work that has happened in the mean time. A rebase will help a lot. |
| pure_virtual_method_decl | ||
{ yywarn(@1, "OOP Pure Virtual methods are supported as parse-only. " | ||
"No enforcement is done for a concrete class to define these further"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need a "Sorry" message here, and not a warning. Since the feature is supported, it should generate an error, and a "Sorry" message (see examples elsewhere in the code) is the convention for expressing that.
9728397
to
0dc8596
Compare
Signed-off-by: Srinivasan Venkataramanan [email protected]