Merge pull request #59863 from cdemirer/fix-match-multiple-bind-single-pattern

Fix issues with multiple bind patterns in match statement
This commit is contained in:
Rémi Verschelde 2022-05-11 14:18:02 +02:00 committed by GitHub
commit 9963ae3553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,4 @@
func test():
match 1:
[[[var a]]], 2:
pass

View file

@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Cannot use a variable bind with multiple patterns.

View file

@ -0,0 +1,6 @@
func test():
match [1, 2, 3]:
[var a, var b, var c]:
print(a == 1)
print(b == 2)
print(c == 3)

View file

@ -0,0 +1,4 @@
GDTEST_OK
true
true
true