aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-12 18:12:27 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-12 18:14:04 +0200
commitc7f3b45abf221c432b3fbd7462741b00a9e10142 (patch)
tree32171eb1c314e64f155fbd05d9ef01e43cac4f53 /tests/neg
parent84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (diff)
downloaddotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.tar.gz
dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.tar.bz2
dotty-c7f3b45abf221c432b3fbd7462741b00a9e10142.zip
Drop restriction to 2nd order hk types
Allow hk type parameters to be higher kinded themselves.
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/t2994.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/neg/t2994.scala b/tests/neg/t2994.scala
index 23a3b6a8b..6964a080e 100644
--- a/tests/neg/t2994.scala
+++ b/tests/neg/t2994.scala
@@ -7,7 +7,7 @@ object Naturals {
type a[s[_ <: NAT] <: NAT, z <: NAT] = z
}
final class SUCC[n <: NAT] extends NAT {
- type a[s[_ <: NAT] <: NAT, z <: NAT] = s[n#a[s, z]] // old-error: not a legal path
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = s[n#a[s, z]] // error: not a legal path
}
type _0 = ZERO
type _1 = SUCC[_0]
@@ -20,8 +20,8 @@ object Naturals {
// crashes scala-2.8.0 beta1
trait MUL[n <: NAT, m <: NAT] extends NAT {
- trait curry[n[_[_], _], s[_]] { type f[z <: NAT] = n[s, z] } // can't do double param lists: // error: `]' expected but `[` found. // error: wrong number of type arguments
- type a[s[_ <: NAT] <: NAT, z <: NAT] = n#a[curry[m#a, s]#f, z] // old-error: not a legal path // old-error: not a legal path
+ trait curry[n[_[_], _], s[_]] { type f[z <: NAT] = n[s, z] }
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = n#a[curry[m#a, s]#f, z] // error: not a legal path // error: not a legal path
}
}