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 ea57e36 + d829950 commit e0962b3Copy full SHA for e0962b3
compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -1842,6 +1842,7 @@ final class SearchRoot extends SearchHistory {
1842
val pruned = prune(List(tree), implicitDictionary.map(_._2).toList, Nil)
1843
implicitDictionary0 = null
1844
if (pruned.isEmpty) result
1845
+ else if (pruned.exists(_._2 == EmptyTree)) NoMatchingImplicitsFailure
1846
else {
1847
// If there are any dictionary entries remaining after pruning, construct a dictionary
1848
// class of the form,
tests/neg/i6796.scala
@@ -0,0 +1,10 @@
1
+object Test {
2
+ class A
3
+ class B
4
+
5
+ implicit def mkA(implicit b: => B): A = ???
6
+ implicit def mkB(implicit a: A, i: Int): B = ???
7
8
+ implicitly[A] // error
9
+}
10
0 commit comments