diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-08-21 12:04:13 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-08-21 12:04:13 +0200 |
commit | ed230b51affa509a03298182b281afce5a74a87d (patch) | |
tree | 42bd553213abeddaa4e430d7d43b676635b9eca1 /test/files/pos/t7517.scala | |
parent | 7b351dca8458f599f5fafef4daa307351031ef06 (diff) | |
parent | 60d462ef6e0dba5f9a7c4cc81255fcb9fba7939a (diff) | |
download | scala-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.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 |