aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t6260.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pending/run/t6260.scala')
-rw-r--r--tests/pending/run/t6260.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pending/run/t6260.scala b/tests/pending/run/t6260.scala
new file mode 100644
index 000000000..cfe9e1e64
--- /dev/null
+++ b/tests/pending/run/t6260.scala
@@ -0,0 +1,12 @@
+class Box[X <: CharSequence](val x: X) extends AnyVal {
+ def map[Y <: CharSequence](f: X => Y): Box[Y] =
+ ((bx: Box[X]) => new Box(f(bx.x)))(this)
+ override def toString = s"Box($x)"
+}
+
+object Test {
+ def main(args: Array[String]) {
+ val g = (x: String) => x + x
+ println(new Box("abc") map g)
+ }
+}