Do error when for variable conflicts with a variable in scope
This commit is contained in:
parent
5b3b06187b
commit
dbdf0174b4
5 changed files with 15 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
func test():
|
||||
var TEST = 1
|
||||
for TEST in 2:
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
There is already a variable named "TEST" declared in this scope.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
func test():
|
||||
var TEST = 1
|
||||
var TEST = 2
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_PARSER_ERROR
|
||||
There is already a variable named "TEST" declared in this scope.
|
||||
Loading…
Add table
Add a link
Reference in a new issue