about summary refs log blame commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-optimised-bools.nix
blob: 650d7f028df2c1b7f17303408a58b5eb705aa4cd (plain) (tree)




















                                  
let
  makeTrue = _: true;
  makeFalse = _: false;
in
[
  # useless `false`
  (false || makeTrue null) # true
  (makeTrue null || false) # true

  # useless `true`
  (true && makeFalse null) # false
  (makeFalse null && true) # false

  # useless `||`
  (true || makeFalse null) # true
  (makeFalse null || true) # true

  # useless `&&`
  (false && makeTrue null) # false
  (makeTrue null && false) # false
]