diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-09-26 15:59:22 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-09-26 15:59:22 +0000 |
commit | 0d5660cbcf1215db7b3fb853b65a5e36f40f86b1 (patch) | |
tree | 480b5e3a32554e79fdcf55bbd981c4e0ceccbb65 /test/disabled/pos/code.scala | |
parent | aeda72b2ea265c7960e8055f526d1bef93940c04 (diff) | |
download | scala-0d5660cbcf1215db7b3fb853b65a5e36f40f86b1.tar.gz scala-0d5660cbcf1215db7b3fb853b65a5e36f40f86b1.tar.bz2 scala-0d5660cbcf1215db7b3fb853b65a5e36f40f86b1.zip |
Disable currently failing pos/code.scala.
Diffstat (limited to 'test/disabled/pos/code.scala')
-rw-r--r-- | test/disabled/pos/code.scala | 20 |
1 files changed, 20 insertions, 0 deletions
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) +} + + |