Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例えば:
q"import scala.collection.mutable.Buffer\ndef foo: Buffer[Int] = ???"
改行文字が解決されないため、これはエラーになります。
私の tmp ディレクトリからのサンプル:
evals += q"""assert ($x.productArity >= ${args.length - 1}, "Bad product arity ("+ $x.productArity +") for assignment")"""
または、セミを使用してください:
q"import scala.collection.mutable.Buffer; def foo: Buffer[Int] = ???"
解析されたものをスプライスすることはできません。