From 1d1aa7a02fc64286a0c81cfb40fbf16f704d017e Mon Sep 17 00:00:00 2001 From: ZuBsPaCe Date: Fri, 10 Sep 2021 22:08:02 +0200 Subject: GDScript: Removed spurious UNASSIGNED_VARIABLE warning for locals Variable->assignment needs to be incremented when assigned a value. Also fixed and improved unit test 'variable_declaration.gd'. Fixes #52551 --- .../gdscript/tests/scripts/parser/features/variable_declaration.out | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'modules/gdscript/tests/scripts/parser/features/variable_declaration.out') diff --git a/modules/gdscript/tests/scripts/parser/features/variable_declaration.out b/modules/gdscript/tests/scripts/parser/features/variable_declaration.out index 2e0a63c024..7817dd3169 100644 --- a/modules/gdscript/tests/scripts/parser/features/variable_declaration.out +++ b/modules/gdscript/tests/scripts/parser/features/variable_declaration.out @@ -1,7 +1,3 @@ GDTEST_OK ->> WARNING ->> Line: 5 ->> UNASSIGNED_VARIABLE ->> The variable 'c' was used but never assigned a value. -1 42 2 23 +11 22 33 44 55 66 77 88 OK -- cgit v1.2.3