diff options
author | Martin Odersky <odersky@gmail.com> | 2015-11-01 17:24:36 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-11-01 17:24:36 +0100 |
commit | 34608562fa4f3697ddf4034fb802182a18c9f687 (patch) | |
tree | 5b37b98bcc59f97dc9ecf878fc270cc6710aa639 | |
parent | f48ea79df03fde590f0ba22dcc52f2c82227b9e9 (diff) | |
download | dotty-34608562fa4f3697ddf4034fb802182a18c9f687.tar.gz dotty-34608562fa4f3697ddf4034fb802182a18c9f687.tar.bz2 dotty-34608562fa4f3697ddf4034fb802182a18c9f687.zip |
Update check file
and explain why it's different now.
-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" |