mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +00:00
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.
17 lines
370 B
Text
17 lines
370 B
Text
GDTEST_OK
|
|
>> WARNING
|
|
>> Line: 5
|
|
>> SHADOWED_VARIABLE
|
|
>> 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 in the current class.
|
|
a
|
|
1
|
|
b
|
|
1
|
|
(1.0, 1.0)
|
|
(0.0, 0.0)
|
|
(6.0, 1.0)
|
|
(0.0, 0.0)
|