diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index cf2d3d278..5a1f47b55 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -248,7 +248,7 @@ struct CompareValues bool operator () (const Value * v1, const Value * v2) const { if (v1->type != v2->type) - throw EvalError("cannot compare values of different types"); + throw EvalError(format("cannot compare %1% with %2%") % showType(*v1) % showType(*v2)); switch (v1->type) { case tInt: return v1->integer < v2->integer;