summaryrefslogtreecommitdiff
path: root/test/disabled/pos
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2011-09-26 15:59:22 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2011-09-26 15:59:22 +0000
commit0d5660cbcf1215db7b3fb853b65a5e36f40f86b1 (patch)
tree480b5e3a32554e79fdcf55bbd981c4e0ceccbb65 /test/disabled/pos
parentaeda72b2ea265c7960e8055f526d1bef93940c04 (diff)
downloadscala-0d5660cbcf1215db7b3fb853b65a5e36f40f86b1.tar.gz
scala-0d5660cbcf1215db7b3fb853b65a5e36f40f86b1.tar.bz2
scala-0d5660cbcf1215db7b3fb853b65a5e36f40f86b1.zip
Disable currently failing pos/code.scala.
Diffstat (limited to 'test/disabled/pos')
-rw-r--r--test/disabled/pos/code.scala20
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)
+}
+
+