diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/code.scala | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/files/pos/code.scala b/test/files/pos/code.scala deleted file mode 100644 index 4def5d2f94..0000000000 --- a/test/files/pos/code.scala +++ /dev/null @@ -1,20 +0,0 @@ -import reflect.runtime.Mirror.ToolBox -import scala.tools.nsc.reporters._ -import scala.tools.nsc.Settings - -object Test extends App { - def foo[T](ys: List[T]) = { - val fun: reflect.Code[Int => Int] = x => x + ys.length - fun - } - val code = foo(List(2)) - val tree = code.tree.asInstanceOf[scala.reflect.runtime.Mirror.Tree] - val targetType = code.manifest.tpe.asInstanceOf[scala.reflect.runtime.Mirror.Type] - println("testing: "+tree) - val reporter = new ConsoleReporter(new Settings) - val toolbox = new ToolBox(reporter, args mkString " ") - val ttree = toolbox.typeCheck(tree, targetType) - println("result = "+ttree) -} - - |