how to use dictionary `match` in godot 4

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By potatobanana

in godot 3.5, this code work.

func _get_transition(delta):
	
	match state:
		state_dic.idle:
			print( "something" )

but when i do in godot 4. i will get this error expression in match pattern must be a constant
how should i do it?

Not sure of the details, but does this seem related to your case?

GDScript 2.0: Cannot parse match with typeof() and enum constants from other script · Issue #63535 · godotengine/godot · GitHub

jgodfrey | 2022-08-22 17:51