mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-16 03:06:17 +02:00
1edd6fada5
previously we reported the error at the beginning of the binding block (for plain inherits) or the beginning of the attr list (for inherit-from), effectively hiding where exactly the error happened. this also carries over to runtime positions of attributes in sets as reported by unsafeGetAttrPos. we're not worried about this changing observable eval behavior because it *is* marked unsafe, and the new behavior is much more useful.
12 lines
237 B
Nix
12 lines
237 B
Nix
let
|
|
d = 0;
|
|
x = 1;
|
|
y = { inherit d x; };
|
|
z = { inherit (y) d x; };
|
|
in
|
|
[
|
|
(builtins.unsafeGetAttrPos "d" y)
|
|
(builtins.unsafeGetAttrPos "x" y)
|
|
(builtins.unsafeGetAttrPos "d" z)
|
|
(builtins.unsafeGetAttrPos "x" z)
|
|
]
|