aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-14 15:01:00 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-15 15:08:22 +0200
commit62531258003dba513a21847d58395823d6840363 (patch)
tree0fcc8a0ab980fa92a2efc79ddb996d30e6ae2d77 /tests
parent409c6c30c8496529aace68967acccf88850145da (diff)
downloaddotty-62531258003dba513a21847d58395823d6840363.tar.gz
dotty-62531258003dba513a21847d58395823d6840363.tar.bz2
dotty-62531258003dba513a21847d58395823d6840363.zip
Changes to overloading
Fix #1381: Overloading is now changed so that we first try without implicit searches. Only if that leaves no applicable alternatives we try again with implicit search turned on. This also fixes test case t2660, which got moved from neg to pos.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/t2660.scala (renamed from tests/neg/t2660.scala)8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/neg/t2660.scala b/tests/pos/t2660.scala
index 17fe26258..695db67b9 100644
--- a/tests/neg/t2660.scala
+++ b/tests/pos/t2660.scala
@@ -1,5 +1,3 @@
-// Dotty deviation. The calls here now are classified as ambiguous.
-
package hoho
class G
@@ -22,9 +20,7 @@ class A[T](x: T) {
object T {
def main(args: Array[String]): Unit = {
implicit def g2h(g: G): H = new H
- new A[Int](new H, 23) // error
- // in the context here, either secondary constructor is applicable
- // to the other, due to the implicit in scope. So the call is ambiguous.
+ new A[Int](new H, 23)
}
}
@@ -40,7 +36,7 @@ object X {
object T2 {
def main(args: Array[String]): Unit = {
implicit def g2h(g: G): H = new H
- X.f(new H, 23) // error
+ X.f(new H, 23)
}
}