diff options
-rw-r--r-- | tests/run/t8280.check | 4 | ||||
-rw-r--r-- | tests/run/t8280.scala | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/run/t8280.check b/tests/run/t8280.check index ed392841c..44c51f5aa 100644 --- a/tests/run/t8280.check +++ b/tests/run/t8280.check @@ -1,8 +1,6 @@ Int Int -Int -Int -Int +Long Int Int Int diff --git a/tests/run/t8280.scala b/tests/run/t8280.scala index 1c9d5cbaa..f433dcc32 100644 --- a/tests/run/t8280.scala +++ b/tests/run/t8280.scala @@ -25,6 +25,7 @@ object Moop1 { // Both f1 and f2 are applicable conversions for Int => String. Neither is better than the other. // Scala2 contains a hack for backwards compatibility, which we are not forced to repeat. // See discussion under SI-8280. + } object ob2 { implicit object f1 extends (Int => String) { def apply(x: Int): String = "Int" } @@ -46,7 +47,7 @@ object Moop2 { implicit def f1(x: Int): String = "Int" implicit object f2 extends (Long => String) { def apply(x: Long): String = "Long" } - println(5: String) + println(5: String) // Dotty deviation: Dotty picks f2, because non-methods are more specific than methods } object ob2 { implicit def f1(x: Int): String = "Int" @@ -68,7 +69,8 @@ object Moop3 { implicit val f1: Int => String = _ => "Int" implicit object f2 extends (Long => String) { def apply(x: Long): String = "Long" } - // println(5: String) // Dotty deviation. This fails for Dotty with ambiguity error. + // println(5: String) + // Dotty deviation. This fails for Dotty with ambiguity error for similar reasons as ob1. } object ob2 { implicit val f1: Int => String = _ => "Int" |