I am trying to write this case authorDao: AuthorDao => authorDao
so that it returns the subclass of Dao itself.
When I use this quasi quote:
val daoType = TypeName(daoName)
val caseTerm = TermName(daoName.toLowerCase)
cases.append(cq"$caseTerm: $daoType=> $caseTerm")
It generates this
case (authordao @ ((_): AuthorDao)) => authordao
And if I do this
cases.append(cq"${q"$caseTerm: $daoType"} => $caseTerm")
It does this
case ((authordao): AuthorDao) => authordao
Both are produce compile errors