1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Do error when for variable conflicts with a variable in scope

This commit is contained in:
cdemirer
2022-07-04 12:30:39 +03:00
parent 5b3b06187b
commit dbdf0174b4
5 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
func test():
var TEST = 1
for TEST in 2:
pass

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
There is already a variable named "TEST" declared in this scope.

View File

@@ -0,0 +1,3 @@
func test():
var TEST = 1
var TEST = 2

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
There is already a variable named "TEST" declared in this scope.