You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an attribute set with a nested recursive attribute set, values defined in the recursive attribute set are visible in attributes defined outside of the rec block.
Steps To Reproduce
In a Nix REPL, evaluate the expression { a = rec { b = 5; }; a.c = b; }
Expected behavior
The expression errors, either saying that b is out of scope or that defining both a = rec {...}; and a.c = ... is not permitted.
Actual behavior
The expression evaluates to { a = { b = 5; c = 5; }; }.
nix-env --version output
nix-env (Nix) 2.7.0pre20220221_caf5172
The text was updated successfully, but these errors were encountered:
Describe the bug
In an attribute set with a nested recursive attribute set, values defined in the recursive attribute set are visible in attributes defined outside of the
rec
block.Steps To Reproduce
In a Nix REPL, evaluate the expression
{ a = rec { b = 5; }; a.c = b; }
Expected behavior
The expression errors, either saying that
b
is out of scope or that defining botha = rec {...};
anda.c = ...
is not permitted.Actual behavior
The expression evaluates to
{ a = { b = 5; c = 5; }; }
.nix-env --version
outputThe text was updated successfully, but these errors were encountered: