You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
GDScript: Fix validate_call_arg() for unresolved datatype
This commit is contained in:
@@ -4837,9 +4837,11 @@ void GDScriptAnalyzer::validate_call_arg(const List<GDScriptParser::DataType> &p
|
|||||||
}
|
}
|
||||||
GDScriptParser::DataType arg_type = p_call->arguments[i]->get_datatype();
|
GDScriptParser::DataType arg_type = p_call->arguments[i]->get_datatype();
|
||||||
|
|
||||||
if ((arg_type.is_variant() || !arg_type.is_hard_type()) && !(par_type.is_hard_type() && par_type.is_variant())) {
|
if (arg_type.is_variant() || !arg_type.is_hard_type()) {
|
||||||
// Argument can be anything, so this is unsafe.
|
// Argument can be anything, so this is unsafe (unless the parameter is a hard variant).
|
||||||
mark_node_unsafe(p_call->arguments[i]);
|
if (!(par_type.is_hard_type() && par_type.is_variant())) {
|
||||||
|
mark_node_unsafe(p_call->arguments[i]);
|
||||||
|
}
|
||||||
} else if (par_type.is_hard_type() && !is_type_compatible(par_type, arg_type, true)) {
|
} else if (par_type.is_hard_type() && !is_type_compatible(par_type, arg_type, true)) {
|
||||||
// Supertypes are acceptable for dynamic compliance, but it's unsafe.
|
// Supertypes are acceptable for dynamic compliance, but it's unsafe.
|
||||||
mark_node_unsafe(p_call);
|
mark_node_unsafe(p_call);
|
||||||
|
|||||||
Reference in New Issue
Block a user