diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-03-09 15:15:55 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-03-09 15:15:55 +0100 |
commit | 3ae265395c43711cabc5193fd3c8f95a9f86c843 (patch) | |
tree | 3bbf4c8f297b10ccce3844628582cc8ed88f1b92 /test/files/run/t7235.scala | |
parent | 5d54cf9e375d796c59b1dd488c15f88f4bfb14d6 (diff) | |
download | scala-3ae265395c43711cabc5193fd3c8f95a9f86c843.tar.gz scala-3ae265395c43711cabc5193fd3c8f95a9f86c843.tar.bz2 scala-3ae265395c43711cabc5193fd3c8f95a9f86c843.zip |
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.
Diffstat (limited to 'test/files/run/t7235.scala')
-rw-r--r-- | test/files/run/t7235.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t7235.scala b/test/files/run/t7235.scala new file mode 100644 index 0000000000..6039189716 --- /dev/null +++ b/test/files/run/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{} = ??? }.tree + println(tpt) + println(tpt.templ.parents) + println(tpt.templ.self) + println(tpt.templ.body) +} |