summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-17 20:16:29 +0200
committerGitHub <noreply@github.com>2021-09-17 20:16:29 +0200
commit424ddcba37cca69d776aa52e85bdd04bb8ca3ae5 (patch)
tree3ef5f064a27fc6eade5ec3b901d6b0abbba2ef3c /modules/gdscript/tests
parent220b69ab564566ca00c8263b629e3d3d3cc64eb5 (diff)
parent651319de11d0c3c4b3278b846b77cb3d034beae3 (diff)
Merge pull request #52792 from vnen/gdscript-subscript-missing-index
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out2
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd
new file mode 100644
index 0000000000..c30c05e4da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.gd
@@ -0,0 +1,3 @@
+func test():
+ var array = [1, 2, 3]
+ array[] = 4
diff --git a/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out
new file mode 100644
index 0000000000..7017c7b4aa
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/subscript_without_index.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression after "[".