From c7452a9940d98351d235aa7c559ea54ec82b5c74 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 24 Aug 2021 13:19:40 +0200 Subject: Fix crash with consecutive commas in Dictionary --- modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd | 2 ++ .../gdscript/tests/scripts/parser/errors/double_dictionary_comma.out | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd create mode 100644 modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.out (limited to 'modules/gdscript/tests/scripts/parser') 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. -- cgit v1.2.3