From e25c86bf5d4912358d0b88f1b58a86e79ed1cfad Mon Sep 17 00:00:00 2001 From: Xwdit Date: Fri, 15 Jul 2022 04:41:47 +0200 Subject: Fixed incorrect type display of function argument in GDScript editor tooltips --- modules/gdscript/gdscript_editor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 2613e1c626..38835fb498 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -671,7 +671,11 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio arghint += String::chr(0xFFFF); } const GDScriptParser::ParameterNode *par = p_function->parameters[i]; - arghint += par->identifier->name.operator String() + ": " + par->get_datatype().to_string(); + if (!par->get_datatype().is_hard_type()) { + arghint += par->identifier->name.operator String() + ": Variant"; + } else { + arghint += par->identifier->name.operator String() + ": " + par->get_datatype().to_string(); + } if (par->default_value) { String def_val = ""; -- cgit v1.2.3