GDScript: Don't allow builtin type names as identifiers
This commit is contained in:
parent
5e609d0e8c
commit
72c07708e8
9 changed files with 30 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
class Vector2:
|
||||
pass
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
The member "Vector2" cannot have the same name as a builtin type.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
const Vector2 = 0
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
The member "Vector2" cannot have the same name as a builtin type.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
enum Vector2 { A, B }
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
The member "Vector2" cannot have the same name as a builtin type.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
var Vector2
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_ANALYZER_ERROR
|
||||
The member "Vector2" cannot have the same name as a builtin type.
|
||||
Loading…
Add table
Add a link
Reference in a new issue