Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasMikula committed Jun 27, 2017
1 parent 10ec413 commit e82474e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/KindProjector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ class KindRewriter(plugin: Plugin, val global: Global)
case Ident(name) =>
makeTypeParamFromName(name)

case TypeDef(m, nm, ps, bs) =>
TypeDef(Modifiers(PARAM), nm, ps.map(makeComplexTypeParam), bs)
case AppliedTypeTree(Ident(name), ps) =>
val tparams = ps.map(makeComplexTypeParam)
TypeDef(Modifiers(PARAM), makeTypeName(name), tparams, DefaultBounds)

case ExistentialTypeTree(AppliedTypeTree(Ident(name), ps), _) =>
val tparams = ps.map(makeComplexTypeParam)
Expand Down
8 changes: 4 additions & 4 deletions src/test/scala/test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Test {
def qux[T[_[_]]] = ()
qux[({type L[A[_]] = Unit})#L]
qux[Lambda[A[_] => Unit]]
qux[Lambda[A[B] => Unit]] // OK
qux[Lambda[A[B] => Unit]]

trait Functor[F[_]]
trait EitherT[F[_], A, B]
Expand All @@ -47,9 +47,9 @@ object Test {
def vex[T[_[_[_]]]] = ()
vex[({type L[A[_[_]]] = Unit})#L]
vex[Lambda[A[_[_]] => Unit]]
vex[Lambda[A[B[_]] => Unit]] // OK
vex[Lambda[A[_[C]] => Unit]] // OK
vex[Lambda[A[B[C]] => Unit]] // error
vex[Lambda[A[B[_]] => Unit]]
vex[Lambda[A[_[C]] => Unit]]
vex[Lambda[A[B[C]] => Unit]]

def hex[T[_[_[_[_]]]]] = ()
hex[({type L[A[_[_[_]]]] = Unit})#L]
Expand Down

0 comments on commit e82474e

Please sign in to comment.