Report anonymous functions as "this function" rather than symbol name

Closes #2453

Thanks for the assist @chris-packett
This commit is contained in:
Ayaz Hafiz 2022-08-10 15:26:52 -07:00
parent 1f45d13c67
commit fdb79da5a8
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 45 additions and 6 deletions

View file

@ -35,8 +35,9 @@ pub enum Problem {
ExposedButNotDefined(Symbol),
UnknownGeneratesWith(Loc<Ident>),
/// First symbol is the name of the closure with that argument
/// Bool is whether the closure is anonymous
/// Second symbol is the name of the argument that is unused
UnusedArgument(Symbol, Symbol, Region),
UnusedArgument(Symbol, bool, 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),