diff options
| author | Danil Alexeev <danil@alexeev.xyz> | 2023-01-18 20:12:33 +0300 |
|---|---|---|
| committer | Danil Alexeev <danil@alexeev.xyz> | 2023-01-25 18:43:56 +0300 |
| commit | b004f8180e37d1d3a6f06bb5f7f6992b8f0ad5d2 (patch) | |
| tree | c32c1b7609fc7a091d66405b63945fce1460a1ec /modules/gdscript/tests/scripts/analyzer/errors | |
| parent | e93266b9ff359c98e9f8e2a550e16ad77490fc4d (diff) | |
GDScript: Allow constant expressions in annotations
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/errors')
| -rw-r--r-- | modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.gd | 6 | ||||
| -rw-r--r-- | modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.gd b/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.gd new file mode 100644 index 0000000000..75524c32ae --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.gd @@ -0,0 +1,6 @@ +var num := 1 + +@export_range(num, 10) var a + +func test(): + pass diff --git a/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out b/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out new file mode 100644 index 0000000000..b4f0e79237 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Argument 1 of annotation "@export_range" isn't a constant expression. |