GDScript: Remove function of continue for match statement

The keyword is confusing and rarely is used in the intended way. It is
removed now in favor of a future feature (pattern guards) to avoid
breaking compatibility later.
This commit is contained in:
George Marques
2023-01-21 13:33:05 -03:00
parent 2ec0da1a75
commit 9462ae4783
10 changed files with 5 additions and 76 deletions
@@ -3,8 +3,6 @@ func test():
match i:
"Hello":
print("hello")
# This will fall through to the default case below.
continue
"Good bye":
print("bye")
_:
@@ -1,4 +1,3 @@
GDTEST_OK
hello
default
This will match
@@ -8,11 +8,10 @@ func test():
1234:
print("2")
match number:
1234:
print("3")
continue
4321:
print("Should not be printed")
_:
print("Should also be printed")
print("3")
match number:
1234:
print("4")
@@ -2,7 +2,6 @@ GDTEST_OK
1
2
3
Should also be printed
4
5
6