Skip to content

Commit dc1bf9f

Browse files
authored
Merge pull request #3732 from dotty-staging/fix-#3452
Fix #3452: Add regression tests
2 parents 710fe34 + 25d8f8f commit dc1bf9f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/neg/i3452.scala

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
object Test {
2+
case class Tuple2K[H[_], T[_], X](h: H[X], t: T[X])
3+
4+
trait TC[A]
5+
6+
implicit def case1[F[_]](implicit t: => TC[F[Any]]): TC[Tuple2K[[_] => Any, F, Any]] = ???
7+
implicit def case2[A, F[_]](implicit r: TC[F[Any]]): TC[A] = ???
8+
9+
implicitly[TC[Int]] // error
10+
}
11+
object Test2 {
12+
trait TC[A]
13+
14+
implicit def case1[F[_]](implicit t: => TC[F[Any]]): TC[String] = ???
15+
implicit def case2[G[_]](implicit r: TC[G[Any]]): TC[Int] = ???
16+
17+
implicitly[TC[Int]] // error
18+
}

0 commit comments

Comments
 (0)