-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80587 from garychia/shadowed_class_name
Check if any global script class is shadowed by a variable
- Loading branch information
Showing
3 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 13 additions & 9 deletions
22
modules/gdscript/tests/scripts/analyzer/warnings/shadowning.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
GDTEST_OK | ||
>> WARNING | ||
>> Line: 3 | ||
>> Line: 5 | ||
>> SHADOWED_GLOBAL_IDENTIFIER | ||
>> The variable "print_debug" has the same name as a built-in function. | ||
>> WARNING | ||
>> Line: 9 | ||
>> Line: 11 | ||
>> SHADOWED_GLOBAL_IDENTIFIER | ||
>> The variable "Array" has the same name as a built-in type. | ||
>> WARNING | ||
>> Line: 10 | ||
>> Line: 12 | ||
>> SHADOWED_GLOBAL_IDENTIFIER | ||
>> The variable "Node" has the same name as a global class. | ||
>> The variable "Node" has the same name as a native class. | ||
>> WARNING | ||
>> Line: 11 | ||
>> Line: 13 | ||
>> SHADOWED_GLOBAL_IDENTIFIER | ||
>> The variable "is_same" has the same name as a built-in function. | ||
>> WARNING | ||
>> Line: 12 | ||
>> Line: 14 | ||
>> SHADOWED_GLOBAL_IDENTIFIER | ||
>> The variable "sqrt" has the same name as a built-in function. | ||
>> WARNING | ||
>> Line: 13 | ||
>> Line: 15 | ||
>> SHADOWED_VARIABLE | ||
>> The local variable "member" is shadowing an already-declared variable at line 1. | ||
>> The local variable "member" is shadowing an already-declared variable at line 3. | ||
>> WARNING | ||
>> Line: 14 | ||
>> Line: 16 | ||
>> SHADOWED_VARIABLE_BASE_CLASS | ||
>> The local variable "reference" is shadowing an already-declared method at the base class "RefCounted". | ||
>> WARNING | ||
>> Line: 17 | ||
>> SHADOWED_GLOBAL_IDENTIFIER | ||
>> The variable "ShadowedClass" has the same name as a global class defined in "shadowning.gd". | ||
warn |