-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
GDScript: Add check for super()
methods not being implemented
#81808
Conversation
433ce42
to
bcc8166
Compare
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.
Tested and seems to be working correctly.
Also fixes #76938
modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd
Outdated
Show resolved
Hide resolved
modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd
Outdated
Show resolved
Hide resolved
modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd
Outdated
Show resolved
Hide resolved
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.
Fresh and ready for 4.2.
bcc8166
to
729c9b4
Compare
Force push was just the comment fixes! :) |
Thanks! |
Cherry-picked for 4.1.3. |
Brings back what I believe is the OK part of #77324. When checking a
super()
call in GDScript, we know what the base class is, and can check up the class hierarchy whether the method exists.The reason that part of #77324 was reverted was because in the general case, when calling any method on any object (e.g. a random node in the scene tree), we can't guarantee that the object doesn't have a script attached (that we don't know of) that implements the method. I don't think this can happen here, because it is specifically for
super()
calls.Fixes #81804.