You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to, I believe, argument sinks consuming all remaining argument of its expected type, and ignoring all other arguments. Then, if any non-consumed argument remains, an "unexpected argument" error is shown. This is fine for normal functions, but for varidic functions this error is rather non-explanatory.
I think that a more beginer-friendly implemenation would be to consume all remaining arguments, no matter its type, and then report errors accordingly if a non-castable value is found.
I haven't used Typst for that long, so if there's a problem with this hypothetical implementation, let me know.
I think this can be closed, b471ac7 introduced a fix for this by retaining the errors and displaying them, however it also displays one error per argument even if they all share the same error reason and span, I think this can be improved and would PR that if I get a nice solution for it.
Activity
tingerrr commentedon Oct 13, 2023
I think this can be closed, b471ac7 introduced a fix for this by retaining the errors and displaying them, however it also displays one error per argument even if they all share the same error reason and span, I think this can be improved and would PR that if I get a nice solution for it.