I have this inheritance
sealed abstract class MyValue
case class MyString(s:String) extends MyValue
case class MyBoolean(b:Boolean) extends MyValue
case class MyR(m1:MyValue, m2:MyValue) extends MyValue
case class MyU(m1:MyValue, m2:MyValue) extends MyValue
/* ... */
and
implicit def string2myString(s:String) = MyString(s)
implicit def boolean2myBoolean(b:Boolean) = MyBoolean(b)
But, I want to do this:
"hello" MyR true // R(MyString("hello"), MyValue(true))
How I can do it?