summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-09-11 17:10:11 +0000
committerPaul Phillips <paulp@improving.org>2010-09-11 17:10:11 +0000
commitf7a6c8823b39c622a1f96f9aaafb828427d4edda (patch)
tree0d97dafc766a5f5e2dadf6908b053555fd80bc35 /test
parent672c1356ef146e8da1f1bd6157df95a2b9c2101b (diff)
downloadscala-f7a6c8823b39c622a1f96f9aaafb828427d4edda.tar.gz
scala-f7a6c8823b39c622a1f96f9aaafb828427d4edda.tar.bz2
scala-f7a6c8823b39c622a1f96f9aaafb828427d4edda.zip
Test case closes #2399, no review.
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/bug2399.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/pos/bug2399.scala b/test/files/pos/bug2399.scala
new file mode 100644
index 0000000000..07882dd549
--- /dev/null
+++ b/test/files/pos/bug2399.scala
@@ -0,0 +1,14 @@
+trait That1[A]
+trait That2[A, R <: That2[A, R]]
+
+trait T[A, This >: Null <: That1[A] with T[A, This]] extends That2[A, This] {
+ self: This =>
+
+ private var next: This = _
+ def isEmpty = next eq null
+
+ def length: Int = {
+ def loop(x: This, cnt: Int): Int = if (x.isEmpty) cnt else loop(x.next, cnt + 1)
+ loop(self, 0)
+ }
+} \ No newline at end of file