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/pending | |
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/pending')
-rw-r--r-- | test/pending/neg/t2994b.scala | 8 | ||||
-rw-r--r-- | test/pending/pos/lubbing-aliases.scala | 40 |
2 files changed, 48 insertions, 0 deletions
diff --git a/test/pending/neg/t2994b.scala b/test/pending/neg/t2994b.scala new file mode 100644 index 0000000000..20be85eb58 --- /dev/null +++ b/test/pending/neg/t2994b.scala @@ -0,0 +1,8 @@ +trait curry[s[_]] { type f = Double } + +// a1 and a2 fail to compile, but all three should fail. +class A { + type a1[s[_ <: Int]] = curry[s] + type a2[s[_ <: Int]] = curry[s]#f + type a3[s[_ <: Int]] = Set[curry[s]#f] +} diff --git a/test/pending/pos/lubbing-aliases.scala b/test/pending/pos/lubbing-aliases.scala new file mode 100644 index 0000000000..9c71a4ec91 --- /dev/null +++ b/test/pending/pos/lubbing-aliases.scala @@ -0,0 +1,40 @@ +trait outer[cc[x], t] { + type M[x] + type V +} + +trait Coll[+A] +trait List[+A] extends Coll[A] +trait Set[A] extends Coll[A] +trait Stream[+A] extends Coll[A] +trait Vector[A] extends Coll[A] + +trait Foo[A] { + type M1[CC[x]] = outer[CC, A]#V + type M2[CC[x]] = M1[CC] + type M3[CC[x]] = outer[CC, A]#M[A] + type M4[CC[x]] = M3[CC] + + def f1: M1[List] + def f2: M2[Set] + def f3: M3[Stream] + def f4: M4[Vector] + + def g12 = List(f1, f2).head + def g13 = List(f1, f3).head + def g14 = List(f1, f4).head + def g23 = List(f2, f3).head + def g24 = List(f2, f4).head + def g34 = List(f3, f4).head +} + +trait Bar extends Foo[Int] { + class Bippy { + def g12 = List(f1, f2).head + def g13 = List(f1, f3).head + def g14 = List(f1, f4).head + def g23 = List(f2, f3).head + def g24 = List(f2, f4).head + def g34 = List(f3, f4).head + } +} |