How to get a raw sequence of reified values in scala macro

白昼怎懂夜的黑 提交于 2020-01-17 05:22:34

问题


I have a c.Expr[Seq[T]] and I want to get a Seq[c.Expr[T]] so I can pass it to a library function that processes it and produces a different final result Expr.

I found this answer explaining how to go in the opposite direction but I can't quite figure out how to invert the process.

reify { xs.splice.map(x => reify { x }) } gives me c.Expr[Seq[c.Expr[T]]], which isn't quite right.

来源:https://stackoverflow.com/questions/39761482/how-to-get-a-raw-sequence-of-reified-values-in-scala-macro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!