Add a regression test for scala/bug#12192
This commit is contained in:
parent
56ac9d6b8b
commit
dd0695ed79
|
@ -16,4 +16,23 @@ object Test {
|
|||
def applied(narrow: Template[Narrow]): High[narrow.Copy] //ok
|
||||
def indirect(narrow: Template[Narrow]): High[({ type T[+A <: Narrow] = narrow.Copy[A] })#T] //also ok
|
||||
}
|
||||
|
||||
trait Expr[X, E] {
|
||||
def applyTo[F[A >: E <: E]] :Expr[X, F[E]]
|
||||
}
|
||||
|
||||
trait Functor[F, A <: U, U] {
|
||||
type Apply[+X <: U]
|
||||
type Super[+X >: A <: U] >: F
|
||||
}
|
||||
|
||||
trait Implicit[X, Y] {
|
||||
type S >: Y
|
||||
val expr :Expr[X, S]
|
||||
}
|
||||
|
||||
def test[F, A <: U, U, X](fun :Functor[F, A, U], x :Implicit[X, A] { type S >: A <: U }) = {
|
||||
x.expr.applyTo[({ type E[B >: A <: U] = fun.Super[B] })#E]
|
||||
x.expr.applyTo[fun.Super]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue