diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-30 16:55:39 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-31 04:21:43 -0700 |
commit | 14534c693d2eb6acafaf8244c14b5643388fbd67 (patch) | |
tree | 20b5bb989a4629bc794e1c9fae591dd5d98ede10 /test/pending/pos | |
parent | cfef577e478161bd4d1e24626e0909c80c04e1b9 (diff) | |
download | scala-14534c693d2eb6acafaf8244c14b5643388fbd67.tar.gz scala-14534c693d2eb6acafaf8244c14b5643388fbd67.tar.bz2 scala-14534c693d2eb6acafaf8244c14b5643388fbd67.zip |
SI-7517 type constructors too eagerly normalized.
I think 403eadd0f1 was largely a symptomatic remedy
(not that we shouldn't harden against such outcomes)
and that this commit gets closer to the root causes.
The unanticipated change to test/files/run/t6113.check
is like a cry of support from the jury box.
-Foo[[X](Int, X)]
+Foo[AnyRef{type l[X] = (Int, X)}#l]
We should continue to look at calls to normalize with
grave suspicion.
Diffstat (limited to 'test/pending/pos')
-rw-r--r-- | test/pending/pos/lubbing-aliases.scala | 40 |
1 files changed, 40 insertions, 0 deletions
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 + } +} |