aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/t2994.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-31 14:03:26 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-09 09:43:05 +0100
commit9a6f82b2ecfd7462d0a1f4e0464878fd58231277 (patch)
tree8e9e46b08d7fdf45f4b1fd06b30d7e35c43f05b1 /tests/neg/t2994.scala
parent44c14b3fb6e5eb6f2b9734f092eef1d85f6b4d18 (diff)
downloaddotty-9a6f82b2ecfd7462d0a1f4e0464878fd58231277.tar.gz
dotty-9a6f82b2ecfd7462d0a1f4e0464878fd58231277.tar.bz2
dotty-9a6f82b2ecfd7462d0a1f4e0464878fd58231277.zip
Reorganize tests to account for new typing of projection
Tests with failed projections are moved to pos-scala2, which was renamed from pos-special. Files in pos-scala2 are compiled with -language:Scala2 option.
Diffstat (limited to 'tests/neg/t2994.scala')
-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 9e9c4ec08..9827b1989 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]]
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = s[n#a[s, z]] // error: not a legal path
}
type _0 = ZERO
type _1 = SUCC[_0]
@@ -21,8 +21,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.
- type a[s[_ <: NAT] <: NAT, z <: NAT] = n#a[curry[m#a, s]#f, z]
+ // 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] // error: not a legal path // error: not a legal path
}
}