1.1 --- a/src/Pure/General/scan.scala Thu Jun 18 14:02:47 2009 +0200
1.2 +++ b/src/Pure/General/scan.scala Thu Jun 18 15:02:18 2009 +0200
1.3 @@ -148,7 +148,10 @@
1.4
1.5 def length: Int = end - start
1.6 def charAt(i: Int): Char = text.charAt(end - i - 1)
1.7 - def subSequence(i: Int, j: Int): CharSequence = new Reverse(text, end - j, end - i)
1.8 +
1.9 + def subSequence(i: Int, j: Int): CharSequence =
1.10 + if (0 <= i && i <= j && j <= length) new Reverse(text, end - j, end - i)
1.11 + else throw new IndexOutOfBoundsException
1.12
1.13 override def toString: String =
1.14 {