in bijection-macros/src/main/scala/com/twitter/bijection/macros/impl/IsCaseClassImpl.scala [9:23]
def isCaseClassImpl[T](c: Context)(implicit T: c.WeakTypeTag[T]): c.Expr[IsCaseClass[T]] = {
import c.universe._
if (isCaseClassType(c)(T.tpe)) {
// TOOD we should support this, just need to make sure it is concrete
if (T.tpe.typeConstructor.takesTypeArgs) {
c.abort(c.enclosingPosition, "Case class with type parameters currently not supported")
} else {
c.Expr[IsCaseClass[T]](
q"""_root_.com.twitter.bijection.macros.impl.MacroGeneratedIsCaseClass[$T]()"""
)
}
} else {
c.abort(c.enclosingPosition, "Type parameter is not a case class")
}
}