diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-15 14:06:58 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-15 14:06:58 +0200 |
commit | 1fb762d11fadc659ef41b79eaddddcce5fbbc192 (patch) | |
tree | e47612705a9af354ab5bdca7864d70b1158ace12 /src/libexpr/nixexpr.cc | |
parent | fd64e4fb96f814440dc337ce664cdbd22e0eabb2 (diff) |
Get rid of explicit ErrorInfo constructors
Diffstat (limited to 'src/libexpr/nixexpr.cc')
-rw-r--r-- | src/libexpr/nixexpr.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index 91a508305..5b2dd9751 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -268,11 +268,10 @@ void ExprVar::bindVars(const StaticEnv & env) enclosing `with'. If there is no `with', then we can issue an "undefined variable" error now. */ if (withLevel == -1) - throw UndefinedVarError( - ErrorInfo { - .hint = hintfmt("undefined variable '%1%'", name), - .nixCode = NixCode { .errPos = pos } - }); + throw UndefinedVarError({ + .hint = hintfmt("undefined variable '%1%'", name), + .nixCode = NixCode { .errPos = pos } + }); fromWith = true; this->level = withLevel; } |