A reasonable configuration language rcl-lang.org
configuration-language json
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove todo in scalar unpack error message

It is still kind of true, here is a reproducer:

let xs = [1, 2]; { a = 1, ..xs }
stdin:1:27

1 │ let xs = [1, 2]; { a = 1, ..xs }
╵ ^~~~
Error: Invalid unpack in dict.

Help: '..' unpacks lists and sets, use '...' to unpack dicts.

I don't think the help is that bad though, the error does say "invalid
unpack" and the help explains that there are ".." and "...", the fact
that "xs" is a list and ".." is the right thing to unpack a list, well
yeah but what do you expect unpacking a list into a dict to do? So I
think it's fine, let's not complicate the already complex error
reporting logic any further.

-3
-3
src/typecheck.rs
··· 943 943 concat! { 944 944 // We could use a note and point at the `..`, but it makes 945 945 // the error verbose. I think just a hint is enough. 946 - // TODO: Sometimes the collection to unpack *is* a list, 947 - // so the `..` is correct, but the surrounding collection is a list 948 - // or set. Then this help is confusing! 949 946 "'" Doc::highlight("..") "' unpacks lists and sets, use '" 950 947 Doc::highlight("...") 951 948 "' to unpack dicts."