summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/parser/features/match.gd
blob: 4d05490aa5a9d126893ecd720424dd03fed3ec4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
func test():
	var i = "Hello"
	match i:
		"Hello":
			print("hello")
			# This will fall through to the default case below.
			continue
		"Good bye":
			print("bye")
		_:
			print("default")

	var j = 25
	match j:
		26:
			print("This won't match")
		_:
			print("This will match")