summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-11 22:17:32 +0000
committerPaul Phillips <paulp@improving.org>2011-10-11 22:17:32 +0000
commitd3f0fa824b2fb12d71fe47187991abd31b47546a (patch)
tree2c116dfa30d234e95438d79b6da3763dc22e91b4 /test/files
parent168f8065ea1ca60eae11964078b189cfb04b5578 (diff)
downloadscala-d3f0fa824b2fb12d71fe47187991abd31b47546a.tar.gz
scala-d3f0fa824b2fb12d71fe47187991abd31b47546a.tar.bz2
scala-d3f0fa824b2fb12d71fe47187991abd31b47546a.zip
Propagate self-type to specialized subclasses.
Closes SI-5071, review by prokopec.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t5071.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/pos/t5071.scala b/test/files/pos/t5071.scala
new file mode 100644
index 0000000000..44ad6276f2
--- /dev/null
+++ b/test/files/pos/t5071.scala
@@ -0,0 +1,18 @@
+// abstract
+trait Foo[@specialized A, Repr] {
+ self: Repr =>
+}
+trait Bar[A] extends Foo[A, Object] { }
+class Baz extends Foo[Int, Baz] { }
+
+// concrete
+trait Bippy {
+ def f(x: Int) = 5
+}
+trait FooC[@specialized A] {
+ self: Bippy =>
+
+ f(10)
+}
+
+class BazC extends FooC[Int] with Bippy { }