aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/t2994.scala
diff options
context:
space:
mode:
authorvsalvis <salvisbergvera@gmail.com>2015-07-10 17:01:35 +0200
committerVladimirNik <vladimir.nikolaev9@gmail.com>2016-02-18 17:54:45 +0100
commit1ed38673d4c88d573363459d316fdfe275d05025 (patch)
tree6ae87391dab765853b97c81dfa4f05bbba2e527b /tests/neg/t2994.scala
parent4be70a5a8469c1355c84bef70936a81f899a9678 (diff)
downloaddotty-1ed38673d4c88d573363459d316fdfe275d05025.tar.gz
dotty-1ed38673d4c88d573363459d316fdfe275d05025.tar.bz2
dotty-1ed38673d4c88d573363459d316fdfe275d05025.zip
Negtests with // error comments
Diffstat (limited to 'tests/neg/t2994.scala')
-rw-r--r--tests/neg/t2994.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/neg/t2994.scala b/tests/neg/t2994.scala
index 9827b1989..23a3b6a8b 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]] // error: not a legal path
+ type a[s[_ <: NAT] <: NAT, z <: NAT] = s[n#a[s, z]] // old-error: not a legal path
}
type _0 = ZERO
type _1 = SUCC[_0]
@@ -20,9 +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] // error: not a legal path // error: not a legal path
+ 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
}
}