Make script annotations placed before class_name and extends

This commit is contained in:
Aaron Franke
2022-10-22 18:32:21 -05:00
parent dcb3754db0
commit 6590e1fd8a
4 changed files with 15 additions and 47 deletions

View File

@@ -1,6 +1,6 @@
# Error here. `class_name` should be used *before* annotations, not after (except @tool).
@icon("res://path/to/optional/icon.svg")
# Error here. Annotations should be used before `class_name`, not after.
class_name HelloWorld
@icon("res://path/to/optional/icon.svg")
func test():
pass

View File

@@ -1,2 +1,2 @@
GDTEST_PARSER_ERROR
"class_name" should be used before annotations (except @tool).
Annotation "@icon" is not allowed in this level.

View File

@@ -1,5 +1,5 @@
class_name HelloWorld
@icon("res://path/to/optional/icon.svg")
class_name HelloWorld
func test():
pass