package example
import upickle._
case class Sentence(words: String*)
object TestUPickle extends App {
println(write(new Sentence("a", "b")))
}
Compiling this leads to an error:
Error:(8, 16) uPickle does not know how to write [example.Sentence]s; define an implicit Writer[example.Sentence] to teach it how
println(write(new Sentence("a", "b")))
^
Error:(8, 16) not enough arguments for method write: (implicit evidence$1: upickle.Writer[example.Sentence])String.
Unspecified value parameter evidence$1.
println(write(new Sentence("a", "b")))
^
If I were to change words to be of Seq[String] type, it works fine. It should have worked either way.
Consider:
Compiling this leads to an error:
If I were to change
words
to be ofSeq[String]
type, it works fine. It should have worked either way.ID: 45 Original Author: ramnivas