1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Merge pull request #12210 from NixOS/mergify/bp/2.25-maintenance/pr-11294

parser-state: fix attribute merging (backport #11294)
This commit is contained in:
mergify[bot] 2025-01-10 20:39:33 +00:00 committed by GitHub
commit 08cd0acf65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 133 additions and 52 deletions

View file

@ -0,0 +1,5 @@
error: undefined variable 'd'
at /pwd/lang/eval-fail-attrset-merge-drops-later-rec.nix:1:26:
1| { a.b = 1; a = rec { c = d + 2; d = 3; }; }.c
| ^
2|

View file

@ -0,0 +1 @@
{ a.b = 1; a = rec { c = d + 2; d = 3; }; }.c

View file

@ -0,0 +1,3 @@
# This is for backwards compatibility, not because we like it.
# See https://github.com/NixOS/nix/issues/9020.
{ a = rec { b = c + 1; d = 2; }; a.c = d + 3; }.a.b

View file

@ -1,6 +1,6 @@
error: attribute 'z' already defined at «stdin»:3:16
at «stdin»:2:3:
1| {
error: attribute 'x.z' already defined at «stdin»:2:3
at «stdin»:3:16:
2| x.z = 3;
| ^
3| x = { y = 3; z = 3; };
| ^
4| }

View file

@ -1,6 +1,6 @@
error: attribute 'y' already defined at «stdin»:3:9
at «stdin»:2:3:
1| {
error: attribute 'x.y.y' already defined at «stdin»:2:3
at «stdin»:3:9:
2| x.y.y = 3;
| ^
3| x = { y.y= 3; z = 3; };
| ^
4| }