-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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: Fix get_*_list()
methods return incorrect info
#81079
GDScript: Fix get_*_list()
methods return incorrect info
#81079
Conversation
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.
Looks fine! And even simplify a lot the code. Thanks as always, @dalexeev
Do you know if this helps or affects #66218 in any way? |
In the case of non-constant expressions (as well as arrays and dictionaries), the default value is unknown. We can only insert |
I guess null could be a reasonable choice, at least that way it would be possible to figure out at least some default arguments. If understood that issue issue right, it's not currently possible in all cases. Then again maybe we could use some magic sentinel value instead of null, like return certain type of object etc. to mark that the value could not be used. That way it would also be possible to tell a difference between an actual null default vs non-constant expression. Not really relevant to this PR, but thanks for answering! |
89c85b2
to
ea22367
Compare
ea22367
to
0be4669
Compare
get_method_list()
for custom functionsget_*_list()
methods return incorrect info
343e7ad
to
3a78b16
Compare
3a78b16
to
51aaffc
Compare
51aaffc
to
462d8f4
Compare
@dalexeev If you could comment the changes you made in this PR, as discussed in the GDScript meeting, it would be very appreciated! |
This PR fixes GDScript "reflection" of properties (static and non-static variables, the latter can optionally be exported), methods and signals. There are many open duplicate issues, but in each of them there are some different details that I tried to cover everything. 1. Prior to this PR, there was no single method for converting a GDScript data type into a The 2. There was an issue with 3. This PR fixes the inconsistent use of the 4. Minor reorganization of 5. Fixed incorrect function parameter names for 6. Fixed bug with missing 7. Fixed bug with missing |
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.
Approved by the GDScript team in meeting. Great work @dalexeev, and especially great explanation of what you did. Magnificent.
Thanks! |
get_method_list()
andclass_get_method_list()
return an incorrect function description #67544.METHOD_FLAG_STATIC
flag was added by Add static method support to core Variant types #46378, this PR adds the flag for GDScript static methods.get_method_list
of GDScript to properly fill the returning array #50425.get_method_list
for custom functions #68454.