aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-15 14:06:58 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-15 14:06:58 +0200
commit1fb762d11fadc659ef41b79eaddddcce5fbbc192 (patch)
treee47612705a9af354ab5bdca7864d70b1158ace12 /src/libexpr/nixexpr.hh
parentfd64e4fb96f814440dc337ce664cdbd22e0eabb2 (diff)
Get rid of explicit ErrorInfo constructors
Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index 47d0e85ec..ec6fd3190 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -236,11 +236,10 @@ 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(
- ErrorInfo {
- .hint = hintfmt("duplicate formal function argument '%1%'", arg),
- .nixCode = NixCode { .errPos = pos }
- });
+ throw ParseError({
+ .hint = hintfmt("duplicate formal function argument '%1%'", arg),
+ .nixCode = NixCode { .errPos = pos }
+ });
};
void setName(Symbol & name);
string showNamePos() const;