title: group by list on same field with different case classes scala
body: <p>how can i do to grouped two list that contains different case classes, but on both classes have same field:</p>
  
  <pre><code>case class X(a:Long, b:Long, c:Long, d:Long)
  case class Y(a:Long, e:Long, f :Long)
  
  val i = List(X(10,10,8,8))
  val j = List(Y(10,10,8))
  
  val joined = a++b
  joined.groupBy(_.a)
  </code></pre>
  
  <p>error: value a is not a member of Product with Serializable</p>
  
  <p>thanks</p>