From bc739a46878d06bd77fcb924a8bd079071057be0 Mon Sep 17 00:00:00 2001 From: George Marques Date: Fri, 30 Dec 2022 11:57:25 -0300 Subject: GDScript: Make using return of void function an error Remove the `VOID_ASSIGNMENT` warning since those cases will be errors now. --- modules/gdscript/gdscript_warning.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'modules/gdscript/gdscript_warning.cpp') diff --git a/modules/gdscript/gdscript_warning.cpp b/modules/gdscript/gdscript_warning.cpp index 36bc051643..9ae4bdae56 100644 --- a/modules/gdscript/gdscript_warning.cpp +++ b/modules/gdscript/gdscript_warning.cpp @@ -80,10 +80,6 @@ String GDScriptWarning::get_message() const { case STANDALONE_EXPRESSION: { return "Standalone expression (the line has no effect)."; } break; - case VOID_ASSIGNMENT: { - CHECK_SYMBOLS(1); - return "Assignment operation, but the function '" + symbols[0] + "()' returns void."; - } break; case NARROWING_CONVERSION: { return "Narrowing conversion (float is converted to int and loses precision)."; } break; @@ -202,7 +198,6 @@ String GDScriptWarning::get_name_from_code(Code p_code) { "UNREACHABLE_CODE", "UNREACHABLE_PATTERN", "STANDALONE_EXPRESSION", - "VOID_ASSIGNMENT", "NARROWING_CONVERSION", "INCOMPATIBLE_TERNARY", "UNUSED_SIGNAL", -- cgit v1.2.3