-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Explorer: Support abstract
virtual methods
#2512
Comments
hi, could I take a crack at this? |
Thanks for the quick reply, happy to help if they need it. |
@Pixep here I am |
HELLO I CAN RESOLVE THIS ISSUE KINDLY LET ME WORK IN THIS PROJECT |
HI @Pixep I would like to wrap this issue |
Thanks for the enthusiasm, let's first see if @n3r0bi0m4n can finish it :) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hid a few comments, to make sure we stay on topic. We may open the issue to be re-assigned in the future, but for now someone already is. |
Hi @Pixep I would like to work on this issue if it is open |
Hey everyone, |
I'm eager to contribute to the effort to resolve the pure virtual function error problem as a student and to do so in order to improve the community while learning essential software development skills. Can I have a chance to work upon? |
@Pixep There is no method that can tell if a method has a body or not. |
During type checking, you can use @shreya024 , @AbdullahGhulamNabi , @himanshusingh0905 the issue is open for anyone to work on it, without being assigned :) |
is it still open can i contribute? |
Thanks for mentioning me. I am glad you responded.
Can you elaborate the the problem and how can I contribute to it as I only
have prior knowledge of C++ and never contributed to open source before.
So, it would be really helpful of you could a glimpse of how can I can deep
dive into it. Waiting for your reply.
…On Thu, Sep 14, 2023, 3:10 PM Jayant Bhoj ***@***.***> wrote:
is it still open can i contribute?
—
Reply to this email directly, view it on GitHub
<#2512 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZGRLLCGHOPJGRHGQ4LJJZLX2LJ25ANCNFSM6AAAAAATROLZLU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Pixep, I would like to work on this if it's open |
Completing the work from #2761 by adding additional test cases. Closes #2512 --------- Co-authored-by: Maan2003 <[email protected]> Co-authored-by: Aleksei Ermakov <[email protected]>
Background
The Carbon explorer currently supports
virtual
andimpl
prefixed virtual method, but notabstract
methods (i.e. pure virtual methods in C++).Goal
Support
abstract
method, as described in the class design doc. This includes:CallableDeclaration::body()
)Starting point
A recommended approach would be to modify the switch/case logic for virtual methods declaration in
explorer/interpreter/type_checker.cpp
(in theTypeChecker::DeclareClassDeclaration
function,VirtualOverride::Abstract
case) to remove the current error logged whenabstract
is used, and check if the method has no body first.This can be tested by creating a running a new lit test under
explorer/testdata/class
, and run usingbazel run //explorer/testdata:class/<my_abstract_method_test.carbon>.run
.Example of tests:
Error case 1
Valid case
Resources
#contributing-help
channel on the DiscordThe text was updated successfully, but these errors were encountered: