summaryrefslogtreecommitdiff
path: root/test/files/pos/t7517.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-08-21 12:04:13 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-08-21 12:04:13 +0200
commited230b51affa509a03298182b281afce5a74a87d (patch)
tree42bd553213abeddaa4e430d7d43b676635b9eca1 /test/files/pos/t7517.scala
parent7b351dca8458f599f5fafef4daa307351031ef06 (diff)
parent60d462ef6e0dba5f9a7c4cc81255fcb9fba7939a (diff)
downloadscala-ed230b51affa509a03298182b281afce5a74a87d.tar.gz
scala-ed230b51affa509a03298182b281afce5a74a87d.tar.bz2
scala-ed230b51affa509a03298182b281afce5a74a87d.zip
Merge remote-tracking branch 'origin/2.10.2' into merge/2.10.2-to-2.10.x
Better late than never. Conflicts: src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
Diffstat (limited to 'test/files/pos/t7517.scala')
-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