aboutsummaryrefslogtreecommitdiff
path: root/tests/lang/eval-okay-attrs2.nix
blob: 9e06b83ac1fd7e70b795b307274a03736d54466d (plain)
1
2
3
4
5
6
7
8
9
10
let {
  as = { x = 123; y = 456; } // { z = 789; } // { z = 987; };

  A = "a";
  Z = "z";

  body = if builtins.hasAttr A as
         then builtins.getAttr A as
         else assert builtins.hasAttr Z as; builtins.getAttr Z as;
}