Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
54835a53
Commit
54835a53
authored
Jun 04, 2020
by
Thakee Nathees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shodowed var warning for `for` loop counter
Fix: #39268
parent
2aa46ee4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
gdscript_parser.cpp
modules/gdscript/gdscript_parser.cpp
+7
-0
No files found.
modules/gdscript/gdscript_parser.cpp
View file @
54835a53
...
...
@@ -3178,6 +3178,13 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
IdentifierNode
*
id
=
alloc_node
<
IdentifierNode
>
();
id
->
name
=
tokenizer
->
get_token_identifier
();
#ifdef DEBUG_ENABLED
for
(
int
j
=
0
;
j
<
current_class
->
variables
.
size
();
j
++
)
{
if
(
current_class
->
variables
[
j
].
identifier
==
id
->
name
)
{
_add_warning
(
GDScriptWarning
::
SHADOWED_VARIABLE
,
id
->
line
,
id
->
name
,
itos
(
current_class
->
variables
[
j
].
line
));
}
}
#endif // DEBUG_ENABLED
tokenizer
->
advance
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment