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

ModHookPreprocessor: discern between no return type and -> void #501

Open
Qubus0 opened this issue Dec 26, 2024 · 0 comments
Open

ModHookPreprocessor: discern between no return type and -> void #501

Qubus0 opened this issue Dec 26, 2024 · 0 comments
Labels
4.x bug Something isn't working
Milestone

Comments

@Qubus0
Copy link
Collaborator

Qubus0 commented Dec 26, 2024

0 is the default for functions that don't specify type so we can't discern if a return type is set to void or if there is none at all.
currently we're dropping the type in those cases.

static func get_return_type_string(return_data: Dictionary) -> String:
    if return_data.type == 0:
        return ""

from get_script_method_list(), the .return is the same

func _ready():
{ "name": "", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 6 }

func _ready() -> void:
{ "name": "", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 6 }

the only way to know is to check if the method string contains -> void

@Qubus0 Qubus0 added bug Something isn't working 4.x labels Dec 26, 2024
@KANAjetzt KANAjetzt added this to the 4.x - 7.x milestone Dec 30, 2024
@KANAjetzt KANAjetzt moved this to Backlog in Mod Hooks Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants