Contextual vararg parameters #18090
Labels
area:reporting
Error reporting including formatting, implicit suggestions, etc
area:typer
good first issue
Perfect for someone who wants to get started contributing
itype:enhancement
Spree
Suitable for a future Spree
Milestone
Compiler version
3.3.2-RC1-bin-20230627-588a0b1-NIGHTLY and before
Minimized code
Output
Expectation
There seems to be no way to define an instance of a vararg type, e.g.
given Int* = 0
won't work.Even if one defines a given instance of a corresponding non-vararg type or a type wrapped into a
Seq
(given Int = 0
orgiven Seq[Int] = Seq(0)
) it won't be picked by the implicits resolution. The only way to pass such parameter seems to befoo(using 0)
.Taking that into account it seems reasonable to raise a warning when a user defines a
using
parameter with a vararg type.The text was updated successfully, but these errors were encountered: