1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Merge pull request #67774 from aaronfranke/script-annotations

Make script annotations be placed before `class_name` and `extends`
This commit is contained in:
Rémi Verschelde
2023-01-16 22:20:44 +01:00
committed by GitHub
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