The type of fields is
List[Symbol], which means that the
type of names of those fields is inconclusive (unknown whether it's a
TypeName). This means that you can't
insert such names essentially anywhere in a quasiquote.
A simple fix would be to do
val name =
field.name.toTermName, explicitly telling the compiler that it's
looking at a term name, so that quasiquote knows how to process it.