summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-12 14:16:04 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-01-12 16:51:03 +0100
commit1baf11a2bb4ed3c816e0484238b426bc0318c27c (patch)
tree01e9910bcc7d6b9d6c5996b1c9bf7bf7ef79fdad /test
parenta8122413c0cf2e51cdfd32c0450b91910f8a8cc2 (diff)
downloadscala-1baf11a2bb4ed3c816e0484238b426bc0318c27c.tar.gz
scala-1baf11a2bb4ed3c816e0484238b426bc0318c27c.tar.bz2
scala-1baf11a2bb4ed3c816e0484238b426bc0318c27c.zip
SI-8143 Fix bug with super-accessors / dependent types
Super-accessors are generated as `DefDef`'s with `EmptyTree` as a placeholder for the RHS. This is filled in later in `Mixin` in `completeSuperAccessor`. A change in `Uncurry` (SI-6443 / 493197f), however, converted this to a `{ EmptyTree }`, which evaded the pattern match in mixin. This commit adds a special case to the dependent method treatment in Uncurry to avoid generating redundant blocks.
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t8138.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/pos/t8138.scala b/test/files/pos/t8138.scala
new file mode 100644
index 0000000000..b980930955
--- /dev/null
+++ b/test/files/pos/t8138.scala
@@ -0,0 +1,24 @@
+
+class U {
+ trait Transformer {
+ def transform(a: Tree): Tree = ???
+ }
+ trait Tree
+}
+
+object Test {
+ def m(u: U) = {
+ class C extends u.Transformer {
+ override def transform(t: u.Tree): u.Tree = {
+ null match {
+ case _ =>
+ // crashes in GenICode:
+ // error: Unknown type: <notype>, <notype> [class scala.reflect.internal.Types$NoType$, class scala.reflect.internal.Types$NoType$] TypeRef? false
+ (y: Any) => super.transform(???)
+ null
+ }
+ ???
+ }
+ }
+ }
+}