GDScript: Use function's header as range for return type UNTYPED_DECLARATION warning

This commit is contained in:
Malcolm Anderson
2026-04-13 16:09:00 -07:00
parent 0dd6299f71
commit ff35cf75a9
3 changed files with 47 additions and 15 deletions
+1 -1
View File
@@ -1983,7 +1983,7 @@ void GDScriptAnalyzer::resolve_function_signature(GDScriptParser::FunctionNode *
#ifdef DEBUG_ENABLED
if (p_function->return_type == nullptr) {
parser->push_warning(p_function, GDScriptWarning::UNTYPED_DECLARATION, "Function", function_visible_name);
parser->push_warning(p_function->start_line, p_function->start_column, p_function->header_end_line, p_function->header_end_column, GDScriptWarning::UNTYPED_DECLARATION, "Function", function_visible_name);
}
#endif // DEBUG_ENABLED