brewery
notashelf /
775bb42c63250b3ee17c160d78dd492b50a1c9eb

nixir

public

Import-resolving Nix IR plugin

Star0tarball
clone
ssh://git@git.notashelf.dev:33/notashelf/nixir.git
tests/precedence.nixNix12 lines298 B
1
# Test operator precedence
2
let
3
  a = 1 + 2 * 3; # Should be 1 + (2 * 3) = 7
4
  b = 10 - 5 - 2; # Should be (10 - 5) - 2 = 3
5
  c = true && false || true; # Should be (true && false) || true = true
6
  d = 1 < 2 && 3 > 2; # Should be (1 < 2) && (3 > 2) = true
7
in {
8
  a = a;
9
  b = b;
10
  c = c;
11
  d = d;
12
}