From aebbbda08060e0cd130c5a682cd91b6babb18c67 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Tue, 16 May 2023 13:03:53 +0300 Subject: GDScript: Fix some bugs with static variables and functions --- .../tests/scripts/analyzer/errors/static_var_export_annotation.gd | 8 ++++++++ .../scripts/analyzer/errors/static_var_export_annotation.out | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.gd create mode 100644 modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out (limited to 'modules/gdscript/tests/scripts/analyzer/errors') diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.gd b/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.gd new file mode 100644 index 0000000000..66697cbb29 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.gd @@ -0,0 +1,8 @@ +# GH-77098 p.3 + +@static_unload + +@export static var a: int + +func test(): + pass diff --git a/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out b/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out new file mode 100644 index 0000000000..4111aa07af --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/static_var_export_annotation.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Annotation "@export" cannot be applied to a static variable. -- cgit v1.2.3