aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8280.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t8280.scala')
-rw-r--r--tests/run/t8280.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/run/t8280.scala b/tests/run/t8280.scala
index f433dcc32..5fcbad0a3 100644
--- a/tests/run/t8280.scala
+++ b/tests/run/t8280.scala
@@ -37,7 +37,8 @@ object Moop1 {
implicit object f1 extends (Int => String) { def apply(x: Int): String = "Int" }
implicit val f2: Long => String = _ => "Long"
- println(5: String)
+ //println(5: String)
+ // This picked f1 before, but is now disallowed since subtypes of functions are no longer implicit conversions
}
}
@@ -73,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)
}