summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/run/idempotency-partial-functions.scala28
-rw-r--r--test/pending/run/t6591_4.check1
-rw-r--r--test/pending/run/t6591_4.scala17
3 files changed, 46 insertions, 0 deletions
diff --git a/test/pending/run/idempotency-partial-functions.scala b/test/pending/run/idempotency-partial-functions.scala
new file mode 100644
index 0000000000..bc0ca706dd
--- /dev/null
+++ b/test/pending/run/idempotency-partial-functions.scala
@@ -0,0 +1,28 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.{ToolBox, ToolBoxError}
+import scala.tools.reflect.Eval
+
+// Related to SI-6187
+//
+// Moved to pending as we are currently blocked by the inability
+// to reify the parent types of the anoymous function class,
+// which are not part of the tree, but rather only part of the
+// ClassInfoType.
+object Test extends App {
+ val partials = reify {
+ List((false,true)) collect { case (x,true) => x }
+ }
+ println(Seq(show(partials), showRaw(partials)).mkString("\n\n"))
+ try {
+ println(partials.eval)
+ } catch {
+ case e: ToolBoxError => println(e)
+ }
+ val tb = cm.mkToolBox()
+ val tpartials = tb.typeCheck(partials.tree)
+ println(tpartials)
+ val rtpartials = tb.resetAllAttrs(tpartials)
+ println(tb.eval(rtpartials))
+}
+Test.main(null) \ No newline at end of file
diff --git a/test/pending/run/t6591_4.check b/test/pending/run/t6591_4.check
new file mode 100644
index 0000000000..0f1c0489e9
--- /dev/null
+++ b/test/pending/run/t6591_4.check
@@ -0,0 +1 @@
+Expr(Block(List(ValDef(Modifiers(), newTermName("v"), Select(Ident(newTermName("A")), newTypeName("I")), Apply(Select(New(Select(Ident(newTermName("A")), newTypeName("I"))), nme.CONSTRUCTOR), List()))), Ident(newTermName("v"))))
diff --git a/test/pending/run/t6591_4.scala b/test/pending/run/t6591_4.scala
new file mode 100644
index 0000000000..f20c8e6127
--- /dev/null
+++ b/test/pending/run/t6591_4.scala
@@ -0,0 +1,17 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.ToolBox
+import scala.tools.reflect.Eval
+
+class O { class I }
+
+class A extends O {
+ val code = reify {
+ val v: I = new I
+ v
+ }
+ println(showRaw(code))
+}
+
+object Test extends App {
+ val v: A#I = (new A).code.eval
+}