I am trying to bind varargs to a List. I have the following (redacted):
final case class Schema(g: List[(Geometry | shape.Shape)]) extends Geometry
def schema(gs: (Geometry | shape.Shape)*): Unit = Schema(gs: _*)
and I get this error:
[error] -- [E007] Type Mismatch Error: /home/user/IdeaProjects/snol/splotly/src/gg/Examples.scala:257:61
[error] 257 | def schema(gs: (Geometry | shape.Shape)*): Unit = Schema(gs: _*)
[error] | ^^
[error] |Found: (gs : Seq[gg.Examples.Geom.Geometry | gg.Examples.shape.Shape] @Repeated)
[error] |Required: List[gg.Examples.Geom.Geometry | gg.Examples.shape.Shape]
[error] one error found
I have looked at the documentation, but I must be missing something obvious.
Can anyone be so kind as to point me in the right direction?
TIA