summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXwdit <xwditfr@gmail.com>2022-07-15 04:41:47 +0200
committerXwdit <44023235+Xwdit@users.noreply.github.com>2022-08-10 15:06:21 +0200
commite25c86bf5d4912358d0b88f1b58a86e79ed1cfad (patch)
treec89ebcbb14e3f1717a5220284e67f74c46c9371d
parent1b06b668c9f0c42927a427f9c9057711a4adafe4 (diff)
Fixed incorrect type display of function argument in GDScript editor tooltips
-rw-r--r--modules/gdscript/gdscript_editor.cpp6
1 files changed, 5 insertions, 1 deletions
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 = "<unknown>";