Commit c6fba6b
committed
Widen ValidationError :key type to allow lists
The struct already stores a list of atoms for the "unknown options"
error (lib/nimble_options.ex:524 passes a list of keys; test
"unknown options" asserts `key: [:not_an_option1, :not_an_option2]`).
The @type for the field said `atom()` only, so the new set-theoretic
checker in elixir-lang/elixir#15366 flags every caller of error_tuple
at that site and cascades into every package that depends on
nimble_options.
Widening to `atom() | [atom()]` matches actual runtime behavior. Doc
updated to call out the multi-key case. No code change, no test
change.
Signed-off-by: Chris Garvis <cgarvis@gmail.com>1 parent f16af25 commit c6fba6b
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
0 commit comments