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

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

14 lines
314 B
GDScript3
Raw Permalink Normal View History

# 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