mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
new pos format for more errors
This commit is contained in:
parent
7c3138844c
commit
ec870b9c85
5 changed files with 35 additions and 12 deletions
|
@ -236,7 +236,11 @@ struct ExprLambda : Expr
|
|||
: pos(pos), arg(arg), matchAttrs(matchAttrs), formals(formals), body(body)
|
||||
{
|
||||
if (!arg.empty() && formals && formals->argNames.find(arg) != formals->argNames.end())
|
||||
throw ParseError("duplicate formal function argument '%1%' at %2%", arg, pos);
|
||||
throw ParseError(
|
||||
ErrorInfo {
|
||||
.hint = hintfmt("duplicate formal function argument '%1%'", arg),
|
||||
.nixCode = NixCode { .errPos = pos }
|
||||
});
|
||||
};
|
||||
void setName(Symbol & name);
|
||||
string showNamePos() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue