Skip to content

Commit 26bc277

Browse files
committed
Fix #4668: Add regression test
1 parent 31fc9ab commit 26bc277

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/neg/i4668.scala

+11
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)