summaryrefslogtreecommitdiff
path: root/test/pending/pos/t5685.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-05-03 12:05:58 -0700
committerPaul Phillips <paulp@improving.org>2012-05-03 12:16:21 -0700
commit264cef8f9677c59395166da9be0af0bfe83abfa5 (patch)
tree41db0c14e6704edb9a06e92af0d4f6cd1c2f22bf /test/pending/pos/t5685.scala
parent453d615fb3c6d0db3a0a43c9232bc12584e39107 (diff)
downloadscala-264cef8f9677c59395166da9be0af0bfe83abfa5.tar.gz
scala-264cef8f9677c59395166da9be0af0bfe83abfa5.tar.bz2
scala-264cef8f9677c59395166da9be0af0bfe83abfa5.zip
Test cases for SI-5472, SI-5399, SI-5685.
Diffstat (limited to 'test/pending/pos/t5685.scala')
-rw-r--r--test/pending/pos/t5685.scala23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/pending/pos/t5685.scala b/test/pending/pos/t5685.scala
new file mode 100644
index 0000000000..9ac42a174e
--- /dev/null
+++ b/test/pending/pos/t5685.scala
@@ -0,0 +1,23 @@
+trait X[A] {
+ def x: A
+}
+
+trait XPrint[A] extends X[A] {
+ abstract override def x: A = {
+ val a = super.x
+ println(a)
+ a
+ }
+}
+
+trait F[A, B] { outer =>
+ def apply(xv: X[A]): X[B]
+
+ def andThen[C](f: F[B, C]): F[A, C] = new F[A, C] {
+ def apply(xv: X[A]): X[C] = f(new XX(xv) with XPrint[B])
+ }
+
+ class XX(xv: X[A]) extends X[B] {
+ def x = outer(xv).x
+ }
+}