diff options
author | James Iry <james.iry@typesafe.com> | 2013-08-26 10:55:41 -0700 |
---|---|---|
committer | James Iry <james.iry@typesafe.com> | 2013-08-26 10:55:41 -0700 |
commit | 682cf972ec2440e4dcaeb0445d451037d4892734 (patch) | |
tree | 5a4ecdb9b454d48c2103ae2b51abee333a2fb259 /test/files/pos/t7517.scala | |
parent | 41ccb26bf5ef399035ec9bc702487d5b22815b17 (diff) | |
parent | 60d462ef6e0dba5f9a7c4cc81255fcb9fba7939a (diff) | |
download | scala-682cf972ec2440e4dcaeb0445d451037d4892734.tar.gz scala-682cf972ec2440e4dcaeb0445d451037d4892734.tar.bz2 scala-682cf972ec2440e4dcaeb0445d451037d4892734.zip |
Merge branch '2.10.2' into 2.10.3
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 |