From 0d5660cbcf1215db7b3fb853b65a5e36f40f86b1 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Mon, 26 Sep 2011 15:59:22 +0000 Subject: Disable currently failing pos/code.scala. --- test/disabled/pos/code.scala | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/disabled/pos/code.scala (limited to 'test/disabled/pos') diff --git a/test/disabled/pos/code.scala b/test/disabled/pos/code.scala new file mode 100644 index 0000000000..4def5d2f94 --- /dev/null +++ b/test/disabled/pos/code.scala @@ -0,0 +1,20 @@ +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) +} + + -- cgit v1.2.3