diff options
author | Trioct <dbaumgartner21@gmail.com> | 2022-05-22 06:50:25 -0500 |
---|---|---|
committer | Trioct <dbaumgartner21@gmail.com> | 2022-05-25 09:02:11 -0500 |
commit | bcbfa641ecac3ff389d0ce49a7b3586f013f6bb4 (patch) | |
tree | a66033aa239cb1dcedbb4911340c04db6b269bf5 /modules/gdscript/tests/scripts/analyzer | |
parent | 4173a4735eb1690132d30430f88fb7d2681c5727 (diff) |
Fix const typed array assignment
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/typed_array_assignment.gd | 2 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/typed_array_assignment.out | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/typed_array_assignment.gd b/modules/gdscript/tests/scripts/analyzer/typed_array_assignment.gd new file mode 100644 index 0000000000..9f86d0531c --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/typed_array_assignment.gd @@ -0,0 +1,2 @@ +func test(): + const arr: Array[int] = ["Hello", "World"] diff --git a/modules/gdscript/tests/scripts/analyzer/typed_array_assignment.out b/modules/gdscript/tests/scripts/analyzer/typed_array_assignment.out new file mode 100644 index 0000000000..26b6e13d4f --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/typed_array_assignment.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Assigned value for constant "arr" has type Array[String] which is not compatible with defined type Array[int]. |