diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-04 22:26:16 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-04 22:26:16 -0700 |
commit | d003dee59cf592879804540a971dab3d8136e480 (patch) | |
tree | 04d74fb30733f082cf5283a8e4442a4817fe4538 /src | |
parent | 6ed849e56c8b47d6abc5e70c5930a05ee3b2917e (diff) | |
download | scala-d003dee59cf592879804540a971dab3d8136e480.tar.gz scala-d003dee59cf592879804540a971dab3d8136e480.tar.bz2 scala-d003dee59cf592879804540a971dab3d8136e480.zip |
Working around the VerifyErrors.
Since the optimizer seems to have lost its mind.
Diffstat (limited to 'src')
-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 = { |