I'm improving the Scala support in Querydsl and I encountered the following issue. Here is a code snippet that illustrates the problem :
// framework types
class RelationalPath[T]
class RelationalPathAdapter[T, R <: RelationalPath[T]](p: R) { def someMethod = {} }
// domain types
class User
class QUser extends RelationalPath[User]
implicit def toAdapter[T, R <: RelationalPath[T]](p: R) = new RelationalPathAdapter[T,R](p)
val path = new QUser()
toAdapter(path).someMethod // DOESN'T COMPILE
path.someMethod // DOESN'T COMPILE
How to match a type in a implicit conversion in addition to it's type argument. I can match either separately, but not both.