mirror of
https://github.com/NixOS/nix
synced 2025-07-08 11:03:54 +02:00
Merge pull request #3468 from Infinisil/functionArgsPositions
Make function arguments retain position info
This commit is contained in:
commit
9ed097db7b
5 changed files with 14 additions and 5 deletions
1
tests/lang/eval-okay-getattrpos-functionargs.exp
Normal file
1
tests/lang/eval-okay-getattrpos-functionargs.exp
Normal file
|
@ -0,0 +1 @@
|
|||
{ column = 11; file = "eval-okay-getattrpos-functionargs.nix"; line = 2; }
|
4
tests/lang/eval-okay-getattrpos-functionargs.nix
Normal file
4
tests/lang/eval-okay-getattrpos-functionargs.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
let
|
||||
fun = { foo }: {};
|
||||
pos = builtins.unsafeGetAttrPos "foo" (builtins.functionArgs fun);
|
||||
in { inherit (pos) column line; file = baseNameOf pos.file; }
|
Loading…
Add table
Add a link
Reference in a new issue