summaryrefslogtreecommitdiff
path: root/test/files/pos/t8060.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-10 01:32:30 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-12-10 01:32:30 +0100
commitbb427a34165b0338be8b23baeb61ac0591b3c0a1 (patch)
tree5264fdc35310d6ece84462a6fa550e56cc2aa3f1 /test/files/pos/t8060.scala
parent0c927046dc5df974e6c39187107cf3548825282b (diff)
downloadscala-bb427a34165b0338be8b23baeb61ac0591b3c0a1.tar.gz
scala-bb427a34165b0338be8b23baeb61ac0591b3c0a1.tar.bz2
scala-bb427a34165b0338be8b23baeb61ac0591b3c0a1.zip
SI-8060 Avoid infinite loop with higher kinded type alias
The `dealiasLocals` map was assuming that: tp.isAliasType implies (tp.dealias ne tp) This isn't true if `!typeParamsMatchArgs`. This commit avoids the infinite loop by checking whether or not dealiasing progresses.
Diffstat (limited to 'test/files/pos/t8060.scala')
-rw-r--r--test/files/pos/t8060.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t8060.scala b/test/files/pos/t8060.scala
new file mode 100644
index 0000000000..90e014d74b
--- /dev/null
+++ b/test/files/pos/t8060.scala
@@ -0,0 +1,11 @@
+trait M[F[_]]
+
+trait P[A] {
+ type CC[X] = P[X]
+ def f(p: A => Boolean): M[CC]
+}
+
+trait Other {
+ // was infinite loop trying to dealias `x$1.CC`
+ def g[A](p: A => Boolean): P[A] => M[P] = _ f p
+}