New Issue: Improve error message when passing 'type' argument to (value) varargs formal

16932, “bradcray”, “Improve error message when passing ‘type’ argument to (value) varargs formal”, “2021-01-12T01:30:16Z”

Currently, when passing a type argument to a (value) varargs formal, the error message looks something like this:

foo.chpl:8: error: unresolved call 'foo("int", type real(64))'
foo.chpl:1: note: this candidate did not match: foo(x ...)
foo.chpl:8: note: because type call actual argument #2
foo.chpl:1: note: is passed to non-type formal '_e1_x'

which is a bit unfortunate in that (a) it reveals an internal symbol name (the expansion of the varargs formal) and (b) doesn’t particularly clearly state that a type can’t be passed to a (value / non-type) varargs formal.

In this issue, I’m proposing we improve this error message. My current proposal is:

foo.chpl:8: error: unresolved call 'foo("int", type real(64))'
foo.chpl:1: note: this candidate did not match: foo(x ...)
foo.chpl:8: note: because actual argument #2 is a 'type'
foo.chpl:1: note: so cannot be passed to a non-type varargs formal

This was split off from user issue #16917.