summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
authorLouis Dumont <louis.dumont@m4x.org>2021-08-25 18:32:24 +0200
committerLouis Dumont <louis.dumont@m4x.org>2021-08-25 18:48:08 +0200
commit79578a5625f297dae632edc2a3aa385ccdb26ab3 (patch)
tree8338f1e1b08a3982c7ab076646900b9b955d2c03 /modules/gdscript/tests
parentee4a8e6a85db8cf2e1a1d533c6453dd7df3008f3 (diff)
Fixed crash when parsing an empty assignment.
Resolves #51620.
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd3
-rw-r--r--modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out2
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd
new file mode 100644
index 0000000000..17c65ad60a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.gd
@@ -0,0 +1,3 @@
+func test():
+ var a = 0
+ a =
diff --git a/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out
new file mode 100644
index 0000000000..1369a7a0dc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/errors/assignment_empty_assignee.out
@@ -0,0 +1,2 @@
+GDTEST_PARSER_ERROR
+Expected an expression after "=".