1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 23:28:26 -04:00
nix/src/libexpr
regnat f6078e474d Also display some suggestions for invalid formal arguments
```console
$ nix eval --expr '({ foo ? 1 }: foo) { fob = 2; }'
error: anonymous function at (string):1:2 called with unexpected argument 'fob'

       at «string»:1:1:

            1| ({ foo ? 1 }: foo) { fob = 2; }
             | ^
       Did you mean foo?
```

Not that because Nix will first check for _missing_ arguments before
checking for extra arguments, `({ foo }: foo) { fob = 1; }` will
complain about the missing `foo` argument (rather than extra `fob`) and
so won’t display a suggestion.
2022-03-08 16:40:22 +01:00
..
flake
primops
attr-path.cc
attr-path.hh
attr-set.cc
attr-set.hh
common-eval-args.cc
common-eval-args.hh
eval-cache.cc
eval-cache.hh
eval-inline.hh
eval.cc Also display some suggestions for invalid formal arguments 2022-03-08 16:40:22 +01:00
eval.hh
fetchurl.nix
function-trace.cc
function-trace.hh
get-drvs.cc
get-drvs.hh
imported-drv-to-derivation.nix
json-to-value.cc
json-to-value.hh
lexer.l
local.mk
nix-expr.pc.in
nixexpr.cc
nixexpr.hh
parser.y
primops.cc
primops.hh
symbol-table.hh
value-to-json.cc
value-to-json.hh
value-to-xml.cc
value-to-xml.hh
value.hh