mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Don't suggest removing variable when it's bound in a branch pattern
Instead, suggest prefixing it with an underscore, or replacing with an underscore. Closes #3820
This commit is contained in:
parent
34c3f266e0
commit
b30c90b500
4 changed files with 47 additions and 4 deletions
|
@ -38,6 +38,7 @@ pub enum Problem {
|
|||
/// Bool is whether the closure is anonymous
|
||||
/// Second symbol is the name of the argument that is unused
|
||||
UnusedArgument(Symbol, bool, Symbol, Region),
|
||||
UnusedBranchDef(Symbol, Region),
|
||||
PrecedenceProblem(PrecedenceProblem),
|
||||
// Example: (5 = 1 + 2) is an unsupported pattern in an assignment; Int patterns aren't allowed in assignments!
|
||||
UnsupportedPattern(BadPattern, Region),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue