Commit 413490c
committed
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.1 parent 87318a2 commit 413490c
File tree
15 files changed
+83
-42
lines changed- doc/classes
- modules/gdscript
- tests/scripts
- analyzer/warnings
- parser/warnings
- runtime/features
15 files changed
+83
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | | - | |
| 567 | + | |
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5809 | 5809 | | |
5810 | 5810 | | |
5811 | 5811 | | |
5812 | | - | |
5813 | | - | |
5814 | 5812 | | |
5815 | 5813 | | |
5816 | 5814 | | |
| |||
5838 | 5836 | | |
5839 | 5837 | | |
5840 | 5838 | | |
| 5839 | + | |
5841 | 5840 | | |
5842 | | - | |
| 5841 | + | |
| 5842 | + | |
| 5843 | + | |
5843 | 5844 | | |
5844 | 5845 | | |
5845 | 5846 | | |
5846 | 5847 | | |
5847 | 5848 | | |
5848 | 5849 | | |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
| 5854 | + | |
| 5855 | + | |
| 5856 | + | |
| 5857 | + | |
| 5858 | + | |
| 5859 | + | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
5849 | 5863 | | |
5850 | 5864 | | |
5851 | | - | |
5852 | | - | |
5853 | | - | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
5854 | 5868 | | |
5855 | | - | |
5856 | | - | |
| 5869 | + | |
| 5870 | + | |
5857 | 5871 | | |
5858 | | - | |
5859 | | - | |
| 5872 | + | |
| 5873 | + | |
5860 | 5874 | | |
5861 | | - | |
5862 | | - | |
| 5875 | + | |
| 5876 | + | |
5863 | 5877 | | |
5864 | | - | |
5865 | | - | |
| 5878 | + | |
| 5879 | + | |
5866 | 5880 | | |
5867 | | - | |
5868 | | - | |
| 5881 | + | |
| 5882 | + | |
5869 | 5883 | | |
5870 | 5884 | | |
5871 | | - | |
| 5885 | + | |
5872 | 5886 | | |
5873 | 5887 | | |
5874 | 5888 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
0 commit comments