summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-05-29 19:20:14 -0700
committerJames Iry <jamesiry@gmail.com>2013-05-29 19:20:14 -0700
commitd16786d1ec75c50a9934eb4d9203bc551c51e2d1 (patch)
tree7eecd6bb4d0dd56883cf6b6b07497cd568b9c947 /test/files
parent810a6de757a44d7d481e0ee1bd9c2fb8abe6043d (diff)
parent403eadd0f10cf6e493b81913148b0b9065e80699 (diff)
downloadscala-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.scala22
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