diff options
-rw-r--r-- | src/library/scala/Predef.scala | 2 | ||||
-rw-r--r-- | src/library/scala/runtime/SeqCharSequence.scala | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 9eb1e6a11b..500ee87c46 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -311,7 +311,7 @@ object Predef extends LowPriorityImplicits { implicit def tuple2ToZippedOps[T1, T2](x: (T1, T2)) = new runtime.Tuple2Zipped.Ops(x) implicit def tuple3ToZippedOps[T1, T2, T3](x: (T1, T2, T3)) = new runtime.Tuple3Zipped.Ops(x) implicit def seqToCharSequence(xs: collection.IndexedSeq[Char]): CharSequence = new runtime.SeqCharSequence(xs) - implicit def arrayToCharSequence(xs: Array[Char]): CharSequence = new runtime.ArrayCharSequence(xs) + implicit def arrayToCharSequence(xs: Array[Char]): CharSequence = new runtime.ArrayCharSequence(xs, 0, xs.length) implicit def genericArrayOps[T](xs: Array[T]): ArrayOps[T] = (xs match { case x: Array[AnyRef] => refArrayOps[AnyRef](x) diff --git a/src/library/scala/runtime/SeqCharSequence.scala b/src/library/scala/runtime/SeqCharSequence.scala index 6bf88e0729..8ef1a9a33e 100644 --- a/src/library/scala/runtime/SeqCharSequence.scala +++ b/src/library/scala/runtime/SeqCharSequence.scala @@ -18,7 +18,11 @@ final class SeqCharSequence(val xs: collection.IndexedSeq[Char]) extends CharSeq } final class ArrayCharSequence(val xs: Array[Char], start: Int, end: Int) extends CharSequence { - def this(xs: Array[Char]) = this(xs, 0, xs.length) + // yikes + // java.lang.VerifyError: (class: scala/runtime/ArrayCharSequence, method: <init> signature: ([C)V) + // Constructor must call super() or this() + // + // def this(xs: Array[Char]) = this(xs, 0, xs.length) def length: Int = math.max(0, end - start) def charAt(index: Int): Char = { |