aboutsummaryrefslogtreecommitdiff
path: root/tests/shell.shebang.rb
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2022-03-08 16:20:01 +0100
committerregnat <rg@regnat.ovh>2022-03-08 16:40:22 +0100
commitf6078e474d5fc41c8a7f683865d60490bf0c7040 (patch)
treec927f410db27a5589db269959508b14302188d11 /tests/shell.shebang.rb
parent33b7514035a967df2ab61ab9770627157aa4f5c5 (diff)
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.
Diffstat (limited to 'tests/shell.shebang.rb')
0 files changed, 0 insertions, 0 deletions