From 1ed38673d4c88d573363459d316fdfe275d05025 Mon Sep 17 00:00:00 2001 From: vsalvis Date: Fri, 10 Jul 2015 17:01:35 +0200 Subject: Negtests with // error comments --- tests/neg/t2994.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/neg/t2994.scala') 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 } } -- cgit v1.2.3