From 8a8752163611400e2386f1f1a449d9d3fb8f1496 Mon Sep 17 00:00:00 2001 From: Mathnerd314 Date: Sun, 6 Sep 2015 17:03:23 -0600 Subject: forceFunction: allow functors as well --- src/libexpr/eval.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/eval.cc') 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); } -- cgit 1.4.1