summaryrefslogtreecommitdiff
path: root/test/files/run/reify_closure3a.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/reify_closure3a.scala')
-rw-r--r--test/files/run/reify_closure3a.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/files/run/reify_closure3a.scala b/test/files/run/reify_closure3a.scala
index 6414fa58a3..d322b970b6 100644
--- a/test/files/run/reify_closure3a.scala
+++ b/test/files/run/reify_closure3a.scala
@@ -6,14 +6,13 @@ object Test extends App {
def foo(y: Int): Int => Int = {
def y1 = y
- val fun: reflect.Code[Int => Int] = x => {
+ val fun = reflect.Code.lift{(x: Int) => {
x + y1
- }
+ }}
val reporter = new ConsoleReporter(new Settings)
val toolbox = new ToolBox(reporter)
- val ttree = toolbox.typeCheck(fun.tree)
- val dyn = toolbox.runExpr(ttree)
+ val dyn = toolbox.runExpr(fun.tree)
dyn.asInstanceOf[Int => Int]
}