From 3ae265395c43711cabc5193fd3c8f95a9f86c843 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 9 Mar 2013 15:15:55 +0100 Subject: reifier is now aware of SI-7235 SI-7235 is caused by a long-standing todo in typedRefinement, which leads to originals of compound type trees swallowing their stats. I'm not sure how exactly to fix SI-7235, but what I am sure about is that we shouldn't silently discard stats during reification. This patch introduces a new implementation restrictions, which now reports that reify of compound type trees with non-empty stats isn't going to work. --- test/files/neg/t7235.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/files/neg/t7235.scala (limited to 'test/files/neg/t7235.scala') diff --git a/test/files/neg/t7235.scala b/test/files/neg/t7235.scala new file mode 100644 index 0000000000..cfebad3fae --- /dev/null +++ b/test/files/neg/t7235.scala @@ -0,0 +1,14 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{universe => ru} +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +class C + +object Test extends App { + val Block(List(ValDef(_, _, tpt: CompoundTypeTree, _)), _) = reify{ val x: C { def x: Int } = ??? }.tree + println(tpt) + println(tpt.templ.parents) + println(tpt.templ.self) + println(tpt.templ.body) +} -- cgit v1.2.3