diff options
| author | girdenis-p <girdenis.p@gmail.com> | 2024-11-06 00:37:18 +0000 |
|---|---|---|
| committer | girdenis-p <girdenis.p@gmail.com> | 2024-11-06 15:04:14 +0000 |
| commit | 413490c270ddf400ab8da39ca97e097fc42ea409 (patch) | |
| tree | 267cce97263480a0f0a08d6e263494b8c32cab9e /modules/gdscript/tests/scripts/runtime | |
| parent | 87318a2fb7fffeb72adca934e31915be077c3d1f (diff) | |
| download | redot-engine-413490c270ddf400ab8da39ca97e097fc42ea409.tar.gz | |
Fix analyzer pushing SHADOWED_VARIABLE warning for members shadowed in subclasses
This fixes a bug in the analyzer where it did not push the SHADOWED_VARIABLE_BASE_CLASS
warning for members shadowed by variable in subclass. It does this by comparing the class
which contains the shadowed member with the class containing the variable, and pushing
SHADOWED_VARIABLE only if the classes are the same. Additionally, SHADOWED_VARIABLE_BASE_CLASS
can take an extra symbol which helps to specify the line for non native base class.
Diffstat (limited to 'modules/gdscript/tests/scripts/runtime')
| -rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out b/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out index 5492c8f763..1650acadb5 100644 --- a/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out +++ b/modules/gdscript/tests/scripts/runtime/features/parameter_shadowing.out @@ -2,11 +2,11 @@ GDTEST_OK >> WARNING >> Line: 5 >> SHADOWED_VARIABLE ->> The local function parameter "a" is shadowing an already-declared variable at line 3. +>> The local function parameter "a" is shadowing an already-declared variable at line 3 in the current class. >> WARNING >> Line: 15 >> SHADOWED_VARIABLE ->> The local function parameter "v" is shadowing an already-declared variable at line 13. +>> The local function parameter "v" is shadowing an already-declared variable at line 13 in the current class. a 1 b |
