You've already forked godot
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:
@@ -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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
"class_name" should be used before annotations (except @tool).
|
||||
Annotation "@icon" is not allowed in this level.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class_name HelloWorld
|
||||
@icon("res://path/to/optional/icon.svg")
|
||||
class_name HelloWorld
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user