Fixed incorrect type display of function argument in GDScript editor tooltips

This commit is contained in:
Xwdit 2022-07-15 04:41:47 +02:00 committed by Xwdit
parent 1b06b668c9
commit e25c86bf5d

View file

@ -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 = "<unknown>";