aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t6260.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t6260.scala')
-rw-r--r--tests/untried/pos/t6260.scala17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/untried/pos/t6260.scala b/tests/untried/pos/t6260.scala
deleted file mode 100644
index 8edfe4ac3..000000000
--- a/tests/untried/pos/t6260.scala
+++ /dev/null
@@ -1,17 +0,0 @@
-class Box[X](val x: X) extends AnyVal {
- def map[Y](f: X => Y): Box[Y] =
- ((bx: Box[X]) => new Box(f(bx.x)))(this)
-}
-
-object Test {
- def map2[X, Y](self: Box[X], f: X => Y): Box[Y] =
- ((bx: Box[X]) => new Box(f(bx.x)))(self)
-
- def main(args: Array[String]): Unit = {
- val f = (x: Int) => x + 1
- val g = (x: String) => x + x
-
- map2(new Box(42), f)
- new Box("abc") map g
- }
-}