Allow using built-in names for variables, push warnings instead

This commit is contained in:
Yuri Roubinsky
2021-11-13 18:40:53 +03:00
parent 3e214a8838
commit 3396b25489
6 changed files with 44 additions and 27 deletions

View File

@ -0,0 +1,2 @@
func test():
var abs = "This variable has the same name as the built-in function."

View File

@ -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'