summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-09-14 12:11:54 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-09-14 12:11:54 +0000
commit4c47e9435d8872a30f579ed451293d4772b95c31 (patch)
treeef6b15a99abca671750bc478a2f6c8257a10d369 /test
parentc40a798bf0b9ebe26385d42dbd90edc61ca0896d (diff)
downloadscala-4c47e9435d8872a30f579ed451293d4772b95c31.tar.gz
scala-4c47e9435d8872a30f579ed451293d4772b95c31.tar.bz2
scala-4c47e9435d8872a30f579ed451293d4772b95c31.zip
relax implicit divergence check
patch contributed by Mark Harrah in http://article.gmane.org/gmane.comp.lang.scala/20700 reviewed by moors and odersky
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t0226.check3
-rw-r--r--test/files/pos/relax_implicit_divergence.scala7
2 files changed, 8 insertions, 2 deletions
diff --git a/test/files/neg/t0226.check b/test/files/neg/t0226.check
index e27ffbc1e1..af81e41a6a 100644
--- a/test/files/neg/t0226.check
+++ b/test/files/neg/t0226.check
@@ -4,8 +4,7 @@ t0226.scala:5: error: not found: type A1
t0226.scala:5: error: not found: type A1
(implicit _1: Foo[List[A1]], _2: Foo[A2]): Foo[Tuple2[List[A1], A2]] =
^
-t0226.scala:8: error: diverging implicit expansion for type Test.this.Foo[((List[Char], Int), (object Nil, Int))]
-starting with method list2Foo in class Test
+t0226.scala:8: error: could not find implicit value for parameter rep: Test.this.Foo[((List[Char], Int), (object Nil, Int))]
foo(((List('b'), 3), (Nil, 4)))
^
three errors found
diff --git a/test/files/pos/relax_implicit_divergence.scala b/test/files/pos/relax_implicit_divergence.scala
new file mode 100644
index 0000000000..8525c84bab
--- /dev/null
+++ b/test/files/pos/relax_implicit_divergence.scala
@@ -0,0 +1,7 @@
+class A(val options: Seq[String])
+
+object Test {
+ implicit def ss: Equiv[Seq[String]] = error("dummy")
+ implicit def equivA(implicit seqEq: Equiv[Seq[String]]): Equiv[A] = error("dummy")
+ implicitly[Equiv[A]]
+} \ No newline at end of file