diff options
author | Paul Phillips <paulp@improving.org> | 2013-06-03 17:40:15 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-06-03 17:40:15 -0700 |
commit | 2d684df991f5c94f1fe792f8f02da2164a24c649 (patch) | |
tree | 420d0fdaa0e57be468db6bef2b06e2dd53ea9a32 /test/files/pos/t7517.scala | |
parent | 69887ddd682057c4787e2e4377830390faf8ecf1 (diff) | |
parent | 14534c693d2eb6acafaf8244c14b5643388fbd67 (diff) | |
download | scala-2d684df991f5c94f1fe792f8f02da2164a24c649.tar.gz scala-2d684df991f5c94f1fe792f8f02da2164a24c649.tar.bz2 scala-2d684df991f5c94f1fe792f8f02da2164a24c649.zip |
Merge pull request #2615 from paulp/issue/7517
SI-7517 type constructors too eagerly normalized.
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..29bd0936ce --- /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[_], K[A[x]] ] { + val box: Box[K] = ??? + + type Split[ A[x] ] = K[ (A ∙ B)#l ] + val a: Box[Split] = Box.split(box) + + //Either of these work: + //val a: Box[Split] = Box.split[K,B](box) + //val a: Box[ ({ type l[A[x]] = K[ (A ∙ B)#l ] })#l ] = Box.split(box) + } +} |