We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ef4f9b + 784e249 commit 9bf1915Copy full SHA for 9bf1915
tests/neg/implicitDivergenc.scala
@@ -0,0 +1,13 @@
1
+object Test {
2
+ class C[T]
3
+ implicit def fGen[T](implicit ev: T): C[T] = ???
4
+ implicit def fString(implicit ev: C[Int]): C[String] = ???
5
+ implicit def fInt: C[Int] = ???
6
+
7
+ implicitly[C[String]]
8
+ implicitly[C[C[String]]]
9
+ implicitly[C[C[C[String]]]]
10
+ implicitly[C[C[C[C[String]]]]]
11
+ implicitly[C[C[C[C[C[String]]]]]]
12
+ implicitly[C[C[C[C[C[C[String]]]]]]] // error: no implicit argument found (because of divergence)
13
+}
0 commit comments