summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-09-10 11:24:51 -0300
committerGitHub <noreply@github.com>2021-09-10 11:24:51 -0300
commit6423e891a683f34124ee10a31a1b9c464ec01b9b (patch)
tree1b7365ca2dbc2847a08dc976c42eecd93d5805df /modules/gdscript/tests
parent6da061faf5dc20a9d0757983e6af1576ee1fc4df (diff)
parentc7452a9940d98351d235aa7c559ea54ec82b5c74 (diff)
Merge pull request #52063 from KoBeWi/double_comma_of_doom
Fix crash with consecutive commas in Dictionary
Diffstat (limited to 'modules/gdscript/tests')
-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.