lifted code that uses non-bound syms: works
import scala.tools.nsc.reporters._ | |
import scala.tools.nsc.Settings | |
import reflect.runtime.Mirror.ToolBox | |
object Test extends App { | |
val code = scala.reflect.Code.lift{ | |
println(List(1).map(x => x).length) | |
}; | |
val reporter = new ConsoleReporter(new Settings) | |
val toolbox = new ToolBox(reporter) | |
val ttree = toolbox.typeCheck(code.tree) | |
toolbox.runExpr(ttree) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment