virtualx-engine/modules/gdscript/tests/scripts/parser/features/match_bind_unused.gd

13 lines
314 B
GDScript

# https://github.com/godotengine/godot/pull/61666
func test():
var dict := {"key": "value"}
match dict:
{"key": var value}:
print(value) # used, no warning
match dict:
{"key": var value}:
pass # unused, warning
match dict:
{"key": var _value}:
pass # unused, suppressed warning from underscore