GDScript: Add some checks for @tool and @icon

This commit is contained in:
Danil Alexeev
2023-04-14 20:45:49 +03:00
parent 27253f3eb2
commit dbc3c82043
5 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
@icon("res://1.png")
@icon("res://1.png")
func test():
pass

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
"@icon" annotation can only be used once.

View File

@@ -0,0 +1,5 @@
@tool
@tool
func test():
pass

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
"@tool" annotation can only be used once.