suppose that i have some case classes
case class Foo(i: Int)
case class Bar(s: String)
i want to define some function that take A : AnyRef as parameter. But! I want to setup it boundaries with:
- A is AnyRef but not an Object
- A is AnyRef but case class only
something like that
def caseClassProcessor[A](A: AnyRef <: Some bounds) = ???
def notObjectProcessor[A](A: AnyRef ! Object) = ???
is it possible any way?
Maybe this example is what you need: