lix/tests/functional/lang/eval-okay-arithmetic-override.nix
piegames 81d5f0a7d9 libexpr: Deprecate overriding __sub and the like
It was never intended to be a feature to be used, and moreover it is
inconsistent: One cannot override `+`, and overriding `__lessThan` won't
affect the builtins which do comparisons.

Change-Id: Iaba54a05aa4c2eb37cdb3dc0d731fcee5a86deba
2024-11-28 18:15:52 +01:00

15 lines
191 B
Nix

let
__sub = _: _: "subtracted";
__mul = _: _: "multiplied";
__div = _: _: "divided";
__lessThan = _: _: "compared";
in
[
(3 + 5)
(4 * 4)
(-3)
(12 - 3)
(0 / 1)
(42 < 16)
]