aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8280.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-01 16:42:00 +0100
committerMartin Odersky <odersky@gmail.com>2015-11-01 16:42:00 +0100
commitf48ea79df03fde590f0ba22dcc52f2c82227b9e9 (patch)
tree6a3e0f1aa2b3a883532333ca92d706232be0e5c1 /tests/run/t8280.scala
parent5ed617b9ac205b831ec69b782472b1afc5752378 (diff)
downloaddotty-f48ea79df03fde590f0ba22dcc52f2c82227b9e9.tar.gz
dotty-f48ea79df03fde590f0ba22dcc52f2c82227b9e9.tar.bz2
dotty-f48ea79df03fde590f0ba22dcc52f2c82227b9e9.zip
Disable failing test
Dotty delivers an ambiguity error. The comment in the test argues why this is OK.
Diffstat (limited to 'tests/run/t8280.scala')
-rw-r--r--tests/run/t8280.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/run/t8280.scala b/tests/run/t8280.scala
index 0734d63b6..1c9d5cbaa 100644
--- a/tests/run/t8280.scala
+++ b/tests/run/t8280.scala
@@ -20,7 +20,11 @@ object Moop1 {
implicit object f1 extends (Int => String) { def apply(x: Int): String = "Int" }
implicit object f2 extends (Long => String) { def apply(x: Long): String = "Long" }
- println(5: String)
+ // println(5: String)
+ // Dotty deviation. The above fails for Dotty with ambiguity error.
+ // 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" }
@@ -64,7 +68,7 @@ object Moop3 {
implicit val f1: Int => String = _ => "Int"
implicit object f2 extends (Long => String) { def apply(x: Long): String = "Long" }
- println(5: String)
+ // println(5: String) // Dotty deviation. This fails for Dotty with ambiguity error.
}
object ob2 {
implicit val f1: Int => String = _ => "Int"