Skip to content

Commit a2abd6c

Browse files
Merge pull request #8474 from dotty-staging/fix-#4668
Fix #4668: Add regression test
2 parents d35392d + 26bc277 commit a2abd6c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/neg/i4668.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
trait Type { type T }
2+
object Type { implicit def Type[S]: Type { type T = S } = new Type { type T = S } }
3+
4+
trait Type1 { type T[_] }
5+
object Type1 { implicit def Type1[S[_]]: Type1 { type T[A] = S[A] } = new Type1 { type T[A] = S[A] } }
6+
7+
trait Functor[F[_]] { def map[A,B](x: F[A])(f: A => B): F[B] }
8+
object Functor { implicit object listFun extends Functor[List] { def map[A,B](ls: List[A])(f: A => B) = ls.map(f) } }
9+
10+
val map: (A:Type,B:Type,F:Type1) ?=> (Functor[F.T]) ?=> (F.T[A.T]) => (A.T => B.T) => F.T[B.T] =
11+
fun ?=> x => f => fun.map(x)(f) // error // error // error: Missing parameter type

0 commit comments

Comments
 (0)