godot/modules/gdscript/tests/scripts/parser/features/match.gd

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
233 B
GDScript3
Raw Normal View History

func test():
var i = "Hello"
match i:
"Hello":
print("hello")
"Good bye":
print("bye")
_:
print("default")
var j = 25
match j:
26:
print("This won't match")
_:
print("This will match")
match 0:
pass