<console>:34: error: ';' expected but 'val' found.
val q"class C { $mods val x = $expr }" = q"class C { val x = 1 }"
^
But there is an easy workaround:
scala> val q"class C { $_ => $mods val x = $expr }" = q"class C { val x = 1 }"
mods: reflect.runtime.universe.Modifiers = Modifiers(, , Map())
expr: reflect.runtime.universe.Tree = 1
Quasiquotes fail to parse following pattern:
But there is an easy workaround: