summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/parser/errors
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-08-24 13:19:40 +0200
committerkobewi <kobewi4e@gmail.com>2021-09-10 15:38:24 +0200
commitc7452a9940d98351d235aa7c559ea54ec82b5c74 (patch)
tree9cce2f9892867d8b6f6a416f80ce3eb3ed7df049 /modules/gdscript/tests/scripts/parser/errors
parent1234c2bdd9fcac46e66af8532920d9b40776cf37 (diff)
downloadredot-engine-c7452a9940d98351d235aa7c559ea54ec82b5c74.tar.gz
Fix crash with consecutive commas in Dictionary
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/errors')
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out2
2 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd
new file mode 100644
index 0000000000..92dfb2366d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd
@@ -0,0 +1,2 @@
+func test():
+ var dictionary = { hello = "world",, }
diff --git a/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out
new file mode 100644
index 0000000000..d1dcd1cb4b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected expression as dictionary key.