mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Merge remote-tracking branch 'upstream/master' into path-info
This commit is contained in:
commit
fd21f9d76e
211 changed files with 3961 additions and 1506 deletions
|
@ -577,6 +577,9 @@ struct CompareValues
|
|||
return v1->integer < v2->fpoint;
|
||||
if (v1->type() != v2->type())
|
||||
state.error("cannot compare %s with %s", showType(*v1), showType(*v2)).debugThrow<EvalError>();
|
||||
// Allow selecting a subset of enum values
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wswitch-enum"
|
||||
switch (v1->type()) {
|
||||
case nInt:
|
||||
return v1->integer < v2->integer;
|
||||
|
@ -599,6 +602,7 @@ struct CompareValues
|
|||
}
|
||||
default:
|
||||
state.error("cannot compare %s with %s; values of that type are incomparable", showType(*v1), showType(*v2)).debugThrow<EvalError>();
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
} catch (Error & e) {
|
||||
if (!errorCtx.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue