Allow using built-in names for variables, push warnings instead
This commit is contained in:
parent
3e214a8838
commit
3396b25489
6 changed files with 44 additions and 27 deletions
|
|
@ -0,0 +1,2 @@
|
|||
func test():
|
||||
var abs = "This variable has the same name as the built-in function."
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 2
|
||||
>> SHADOWED_GLOBAL_IDENTIFIER
|
||||
>> The local variable 'abs' has the same name as a built-in function.
|
||||
>> WARNING
|
||||
>> Line: 2
|
||||
>> UNUSED_VARIABLE
|
||||
>> The local variable 'abs' is declared but never used in the block. If this is intended, prefix it with an underscore: '_abs'
|
||||
Loading…
Add table
Add a link
Reference in a new issue