mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Let the ordering operators also work on strings
E.g. ‘"foo" < "bar"’ now works.
This commit is contained in:
parent
3d77b28eac
commit
8e74c0bfd1
3 changed files with 12 additions and 4 deletions
|
@ -1 +1 @@
|
|||
2185
|
||||
2188
|
||||
|
|
|
@ -50,6 +50,11 @@ let {
|
|||
(if 2 > 1 == 1 < 2 then 1 else err)
|
||||
(if 1 + 2 * 3 >= 7 then 1 else err)
|
||||
(if 1 + 2 * 3 < 7 then err else 1)
|
||||
|
||||
# Not integer, but so what.
|
||||
(if "aa" < "ab" then 1 else err)
|
||||
(if "aa" < "aa" then err else 1)
|
||||
(if "foo" < "foobar" then 1 else err)
|
||||
];
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue