This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Description
Describe the bug
A Bound variable in pattern: Var error is generated for maybe expressions that bind a variable in their else patterns:
foo() ->
maybe
foo ?= bar()
else
e = Error -> Error
% ^- Bound variable in pattern: Error
end.
To Reproduce
Use the code above.
Expected behavior
No 'bound variable in pattern' hint is generated.
Actual behavior
A 'bound variable in pattern' hint is generated even though the variable is not already bound.
Context
erlang_ls version (tag/sha): Version: 0.52.0+build.1987.ref8700e96
- Editor used: Zed v0.139.3
- LSP client used: Zed v0.139.3