From ba36c44c31d1a1e0b5c0cf3d4775edd0ae0d5a13 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 28 Sep 2012 14:36:42 -0700 Subject: Fix for SI-4744, another variety of cycle. I threw this in with the previous commit behind -Ybreak-cycles, but this one is much less sketchy. Explanation: have to handle f-bounds more deftly. Namers forces lower bounds to prevent recursion in that direction, but a light touch is required to handle these two situations differently: // This is a cyclic type parameter - an error is correct class A[T <: Comparable[_ <: T]] // This is not cyclic - it flips the arrow class B[T <: Comparable[_ >: T]] Long have I been haunted by the knowledge that you can write class B in java, but not in scala: public class B> {} It's over! We've achieved parity with java. --- test/files/pos/t4744.flags | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/files/pos/t4744.flags (limited to 'test/files/pos/t4744.flags') diff --git a/test/files/pos/t4744.flags b/test/files/pos/t4744.flags new file mode 100644 index 0000000000..ca20f55172 --- /dev/null +++ b/test/files/pos/t4744.flags @@ -0,0 +1 @@ +-Ybreak-cycles -- cgit v1.2.3