summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-25 17:28:22 +0200
committerGitHub <noreply@github.com>2022-05-25 17:28:22 +0200
commit6369e495fdc82d64ba8aa4543ad44ca04b7e0d56 (patch)
treef0a2196a5bc9fdd8de3e012a50a554fd68a994fc /modules/gdscript/tests/scripts
parente73f9536a2978d50c109df36720aa3f6e5c4af43 (diff)
parentbcbfa641ecac3ff389d0ce49a7b3586f013f6bb4 (diff)
Merge pull request #61279 from Trioct/fix-typed-array-assignment
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/typed_array_assignment.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/typed_array_assignment.out2
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].