diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-03 12:05:58 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-03 12:16:21 -0700 |
commit | 264cef8f9677c59395166da9be0af0bfe83abfa5 (patch) | |
tree | 41db0c14e6704edb9a06e92af0d4f6cd1c2f22bf /test/pending/pos/t5685.scala | |
parent | 453d615fb3c6d0db3a0a43c9232bc12584e39107 (diff) | |
download | scala-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.scala | 23 |
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 + } +} |