diff options
author | Martin Odersky <odersky@gmail.com> | 2014-06-18 18:20:14 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-06-18 18:21:07 +0200 |
commit | 7f721438b5bccc8ca9dd68cef273c8cac8199e1a (patch) | |
tree | a619fb770fee578354c7fca1f1c30c68f0d542d0 /tests/neg | |
parent | 388d9a889c6929699e879a307dc80145b906390a (diff) | |
download | dotty-7f721438b5bccc8ca9dd68cef273c8cac8199e1a.tar.gz dotty-7f721438b5bccc8ca9dd68cef273c8cac8199e1a.tar.bz2 dotty-7f721438b5bccc8ca9dd68cef273c8cac8199e1a.zip |
Handling higher-kinded types with lambdas
Switch to the new scheme where higher-kinded types (and also some polymorphic
type aliases) are represented as instances of Lambda traits.
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/t0654.scala | 2 | ||||
-rw-r--r-- | tests/neg/t2994.scala | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/neg/t0654.scala b/tests/neg/t0654.scala index 52dbbb014..0d0f2f7de 100644 --- a/tests/neg/t0654.scala +++ b/tests/neg/t0654.scala @@ -1,5 +1,5 @@ object Test { class Foo[T] type C[T] = Foo[_ <: T] // error: parameter type T of type alias does not appear as type argument of the aliased class Foo - val a: C[AnyRef] = new Foo[AnyRef] // follow-on error: wrong number of type arguments for Test.C, should be 0 + val a: C[AnyRef] = new Foo[AnyRef] } diff --git a/tests/neg/t2994.scala b/tests/neg/t2994.scala index f3009b12f..9e9c4ec08 100644 --- a/tests/neg/t2994.scala +++ b/tests/neg/t2994.scala @@ -20,7 +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] } + trait curry[n[_[_], _], s[_]] { type f[z <: NAT] = n[s, z] } // can't do double param lists: + // error: `]' expected but `[` found. type a[s[_ <: NAT] <: NAT, z <: NAT] = n#a[curry[m#a, s]#f, z] } |