aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8280.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-08 22:06:22 +0100
committerMartin Odersky <odersky@gmail.com>2017-03-08 22:06:35 +0100
commitaa2f9078d76a21d828a06b8e324d31a502ee505c (patch)
treebf657e58c1a78357349def2309dd41c0cecdd9a1 /tests/run/t8280.scala
parent180dfdc7e81d632e599fb0a545025720e8000573 (diff)
downloaddotty-aa2f9078d76a21d828a06b8e324d31a502ee505c.tar.gz
dotty-aa2f9078d76a21d828a06b8e324d31a502ee505c.tar.bz2
dotty-aa2f9078d76a21d828a06b8e324d31a502ee505c.zip
Drop special case around Function1
Now only Scala2 mode treats Function1's as implicit conversions. Instead we introduce a new subclass ImplicitConverter of Function1, instances of which are turned into implicit conversions.
Diffstat (limited to 'tests/run/t8280.scala')
-rw-r--r--tests/run/t8280.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/run/t8280.scala b/tests/run/t8280.scala
index 1d2c56b85..5fcbad0a3 100644
--- a/tests/run/t8280.scala
+++ b/tests/run/t8280.scala
@@ -74,14 +74,14 @@ object Moop3 {
// Dotty deviation. This fails for Dotty with ambiguity error for similar reasons as ob1.
}
object ob2 {
- implicit val f1: Int => String = _ => "Int"
+ implicit val f1: ImplicitConverter[Int, String] = _ => "Int"
implicit def f2(x: Long): String = "Long"
println(5: String)
}
object ob3 {
- implicit val f1: Int => String = _ => "Int"
- implicit val f2: Long => String = _ => "Long"
+ implicit val f1: ImplicitConverter[Int, String] = _ => "Int"
+ implicit val f2: ImplicitConverter[Long, String] = _ => "Long"
println(5: String)
}