mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	 9462ae4783
			
		
	
	
		9462ae4783
		
			
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			215 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			215 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
| 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")
 |