You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
GDScript: Check function arguments on release too
Needed because otherwise the certain type operations (such as type casting) used as a function argument might become unresolved on release, causing a compilation failure. Fix #28680
This commit is contained in:
@@ -7046,12 +7046,10 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
|||||||
|
|
||||||
return_type = _type_from_property(mi.return_val, false);
|
return_type = _type_from_property(mi.return_val, false);
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
|
||||||
// Check all arguments beforehand to solve warnings
|
// Check all arguments beforehand to solve warnings
|
||||||
for (int i = 1; i < p_call->arguments.size(); i++) {
|
for (int i = 1; i < p_call->arguments.size(); i++) {
|
||||||
_reduce_node_type(p_call->arguments[i]);
|
_reduce_node_type(p_call->arguments[i]);
|
||||||
}
|
}
|
||||||
#endif // DEBUG_ENABLED
|
|
||||||
|
|
||||||
// Check arguments
|
// Check arguments
|
||||||
|
|
||||||
@@ -7079,12 +7077,10 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
|||||||
ERR_FAIL_V(DataType());
|
ERR_FAIL_V(DataType());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
|
||||||
// Check all arguments beforehand to solve warnings
|
// Check all arguments beforehand to solve warnings
|
||||||
for (int i = arg_id + 1; i < p_call->arguments.size(); i++) {
|
for (int i = arg_id + 1; i < p_call->arguments.size(); i++) {
|
||||||
_reduce_node_type(p_call->arguments[i]);
|
_reduce_node_type(p_call->arguments[i]);
|
||||||
}
|
}
|
||||||
#endif // DEBUG_ENABLED
|
|
||||||
|
|
||||||
IdentifierNode *func_id = static_cast<IdentifierNode *>(p_call->arguments[arg_id]);
|
IdentifierNode *func_id = static_cast<IdentifierNode *>(p_call->arguments[arg_id]);
|
||||||
callee_name = func_id->name;
|
callee_name = func_id->name;
|
||||||
|
|||||||
Reference in New Issue
Block a user