summaryrefslogtreecommitdiff
path: root/test/files/pos/t1756.scala
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2011-11-02 14:34:35 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2011-11-02 14:34:35 +0000
commitb6778be91900b8161e705dc2598ef7af86842b0b (patch)
treed15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/pos/t1756.scala
parentac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff)
downloadscala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz
scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2
scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip
Begone t1737...
Diffstat (limited to 'test/files/pos/t1756.scala')
-rwxr-xr-xtest/files/pos/t1756.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/pos/t1756.scala b/test/files/pos/t1756.scala
index 1d067c3b04..2e09c8a94a 100755
--- a/test/files/pos/t1756.scala
+++ b/test/files/pos/t1756.scala
@@ -1,5 +1,5 @@
-/**
+/**
This is a tricky issue which has to do with the fact that too much conflicting
type information is propagated into a single implicit search, where the intended
solution applies two implicit searches.
@@ -35,20 +35,20 @@ class Poly[C <: Ring[C]](val c: C) extends Ring[Poly[C]] {
}
object Test extends App {
-
+
implicit def coef2poly[C <: Ring[C]](c: C): Poly[C] = new Poly(c)
val a = new A
val x = new Poly(new A)
-
+
println(x+a) // works
println(a+x) // works
-
+
val y = new Poly(new Poly(new A))
-
+
println(x+y*x) // works
println(x*y+x) // works
println(y*x+x) // works
-
+
println(x+x*y) // failed before
}