aboutsummaryrefslogtreecommitdiff
path: root/tests/disabled/macro/run/macro-reify-freevars/Test_2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/disabled/macro/run/macro-reify-freevars/Test_2.scala')
-rw-r--r--tests/disabled/macro/run/macro-reify-freevars/Test_2.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/disabled/macro/run/macro-reify-freevars/Test_2.scala b/tests/disabled/macro/run/macro-reify-freevars/Test_2.scala
new file mode 100644
index 000000000..11c8128cd
--- /dev/null
+++ b/tests/disabled/macro/run/macro-reify-freevars/Test_2.scala
@@ -0,0 +1,11 @@
+object Test extends dotty.runtime.LegacyApp {
+ import scala.reflect.runtime.universe._
+ import scala.reflect.runtime.{currentMirror => cm}
+ import scala.tools.reflect.ToolBox
+ val q = New(AppliedTypeTree(Select(Select(Select(Ident(TermName("scala")), TermName("collection")), TermName("slick")), TypeName("Queryable")), List(Ident(TermName("Int")))))
+ val x = ValDef(NoMods, TermName("x"), Ident(TermName("Int")), EmptyTree)
+ val fn = Function(List(x), Apply(Select(Ident(TermName("x")), TermName("$plus")), List(Literal(Constant("5")))))
+ val tree = Apply(Select(q, TermName("map")), List(fn))
+ try cm.mkToolBox().eval(tree)
+ catch { case ex: Throwable => println(ex.getMessage) }
+} \ No newline at end of file