mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
parser-state: fix attribute merging
(cherry picked from commit 8034589d7e
)
This commit is contained in:
parent
85a4f62400
commit
5575a2f1c3
8 changed files with 133 additions and 52 deletions
|
@ -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|
|
|
@ -0,0 +1 @@
|
|||
{ a.b = 1; a = rec { c = d + 2; d = 3; }; }.c
|
|
@ -0,0 +1 @@
|
|||
6
|
|
@ -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
|
|
@ -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| }
|
||||
|
|
|
@ -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| }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue