aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8280.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-01 17:24:36 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-01 17:24:36 +0100
commit34608562fa4f3697ddf4034fb802182a18c9f687 (patch)
tree5b37b98bcc59f97dc9ecf878fc270cc6710aa639 /tests/run/t8280.scala
parentf48ea79df03fde590f0ba22dcc52f2c82227b9e9 (diff)
downloaddotty-34608562fa4f3697ddf4034fb802182a18c9f687.tar.gz
dotty-34608562fa4f3697ddf4034fb802182a18c9f687.tar.bz2
dotty-34608562fa4f3697ddf4034fb802182a18c9f687.zip
Update check file
and explain why it's different now.
Diffstat (limited to 'tests/run/t8280.scala')
-rw-r--r--tests/run/t8280.scala6
1 files changed, 4 insertions, 2 deletions
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"