diff options
author | James Iry <jamesiry@gmail.com> | 2013-05-29 19:20:14 -0700 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-05-29 19:20:14 -0700 |
commit | d16786d1ec75c50a9934eb4d9203bc551c51e2d1 (patch) | |
tree | 7eecd6bb4d0dd56883cf6b6b07497cd568b9c947 /test/files | |
parent | 810a6de757a44d7d481e0ee1bd9c2fb8abe6043d (diff) | |
parent | 403eadd0f10cf6e493b81913148b0b9065e80699 (diff) | |
download | scala-d16786d1ec75c50a9934eb4d9203bc551c51e2d1.tar.gz scala-d16786d1ec75c50a9934eb4d9203bc551c51e2d1.tar.bz2 scala-d16786d1ec75c50a9934eb4d9203bc551c51e2d1.zip |
Merge pull request #2607 from retronym/ticket/7517
SI-7517 Fix higher kinded type inference regression
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/t7517.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/pos/t7517.scala b/test/files/pos/t7517.scala new file mode 100644 index 0000000000..7ce4c6b13e --- /dev/null +++ b/test/files/pos/t7517.scala @@ -0,0 +1,22 @@ +trait Box[ K[A[x]] ] + +object Box { + // type constructor composition + sealed trait ∙[A[_], B[_]] { type l[T] = A[B[T]] } + + // composes type constructors inside K + type SplitBox[K[A[x]], B[x]] = Box[ ({ type l[A[x]] = K[ (A ∙ B)#l] })#l ] + + def split[ K[A[x]], B[x] ](base: Box[K]): SplitBox[K,B] = ??? + + class Composed[B[_], L[A[x]] ] { + val box: Box[L] = ??? + + type Split[ A[x] ] = L[ (A ∙ B)#l ] + val a: Box[Split] = Box.split(box) + + //Either of these work: + val a1: Box[Split] = Box.split[L,B](box) + val a2: Box[ ({ type l[A[x]] = L[ (A ∙ B)#l ] })#l ] = Box.split(box) + } +}
\ No newline at end of file |