diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/pos/t1756.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/files/pos/t1756.scala')
-rwxr-xr-x | test/files/pos/t1756.scala | 12 |
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 } |