summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-10 16:31:20 +0200
committerGitHub <noreply@github.com>2022-08-10 16:31:20 +0200
commit26b2ac82ffc482d81108b9ca5d59f167db409d36 (patch)
tree3f5e72647730492f095cf435def7de8a55aa32e2 /modules/gdscript/gdscript_editor.cpp
parentcf95056c918b30509c3b181d672e6cfdc971d34f (diff)
parent7e262310a2db5802726f78c54a7db7f2646d3fa8 (diff)
Merge pull request #63020 from Xwdit/fix_gds_editor_tooltip_return_type
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 2613e1c626..35dbdf8c8d 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -660,7 +660,13 @@ static String _make_arguments_hint(const MethodInfo &p_info, int p_arg_idx, bool
}
static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_function, int p_arg_idx) {
- String arghint = p_function->get_datatype().to_string() + " " + p_function->identifier->name.operator String() + "(";
+ String arghint;
+
+ if (p_function->get_datatype().builtin_type == Variant::NIL) {
+ arghint = "void " + p_function->identifier->name.operator String() + "(";
+ } else {
+ arghint = p_function->get_datatype().to_string() + " " + p_function->identifier->name.operator String() + "(";
+ }
for (int i = 0; i < p_function->parameters.size(); i++) {
if (i > 0) {