Skip to content

Commit

Permalink
virtual func return type check implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
ThakeeNathees committed Jul 7, 2020
1 parent ff5dfcd commit dbe6628
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7991,6 +7991,9 @@ void GDScriptParser::_check_function_types(FunctionNode *p_function) {
if (_get_function_signature(base_type, p_function->name, return_type, arg_types, default_arg_count, _static, vararg)) {
bool valid = _static == p_function->_static;
valid = valid && return_type == p_function->return_type;
if (!p_function->return_type.has_type) {
p_function->return_type = return_type;
}
int argsize_diff = p_function->arguments.size() - arg_types.size();
valid = valid && argsize_diff >= 0;
valid = valid && p_function->default_values.size() >= default_arg_count + argsize_diff;
Expand Down

0 comments on commit dbe6628

Please sign in to comment.