summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/parser/errors
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-10-22 18:32:21 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-12-19 22:01:29 -0600
commit6590e1fd8a0770894626d012c2391f2ae1efa497 (patch)
tree1046f111aaa78cc14f69dbfe73f6a79b480a76a3 /modules/gdscript/tests/scripts/parser/errors
parentdcb3754db09b7b8c35aae1fedbc485b91e9f9508 (diff)
Make script annotations placed before class_name and extends
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/errors')
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd4
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd
index ada6030132..ab8b056f99 100644
--- a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd
+++ b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd
@@ -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
diff --git a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out
index 02b33c8692..a598ff8424 100644
--- a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out
+++ b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.out
@@ -1,2 +1,2 @@
GDTEST_PARSER_ERROR
-"class_name" should be used before annotations (except @tool).
+Annotation "@icon" is not allowed in this level.