diff options
author | Mathnerd314 <mathnerd314.gph+hs@gmail.com> | 2015-09-06T23·03-0600 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-10-08T11·19+0200 |
commit | 8a8752163611400e2386f1f1a449d9d3fb8f1496 (patch) | |
tree | e0a9a194862054d4a0eb68d631b95817aa837608 /src/libexpr/eval.cc | |
parent | 055ab1fc8da1e7c2cfadb671acc8bdb9f2b245aa (diff) |
forceFunction: allow functors as well
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 74f88e498fed..93c3111af3e4 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1294,7 +1294,7 @@ bool EvalState::forceBool(Value & v) void EvalState::forceFunction(Value & v, const Pos & pos) { forceValue(v); - if (v.type != tLambda && v.type != tPrimOp && v.type != tPrimOpApp) + if (v.type != tLambda && v.type != tPrimOp && v.type != tPrimOpApp && !isFunctor(v)) throwTypeError("value is %1% while a function was expected, at %2%", v, pos); } |