Skip to content

Commit

Permalink
adapt to scala/scala#9292
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed May 13, 2022
1 parent c245e6e commit 1b43999
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Expand Up @@ -25,8 +25,6 @@ object CharArrayReader {
* @param chars an array of characters
* @param index starting offset into the array; the first element returned will be `source(index)`
*/
class CharArrayReader(chars: Array[Char], index: Int) extends CharSequenceReader(chars, index) {

class CharArrayReader(chars: Array[Char], index: Int) extends CharSequenceReader(java.nio.CharBuffer.wrap(chars), index) {
def this(chars: Array[Char]) = this(chars, 0)

}
Expand Up @@ -29,7 +29,7 @@ class PagedSeqReader(seq: PagedSeq[Char],
override val offset: Int) extends Reader[Char] { outer =>
import PagedSeqReader._

override val source: java.lang.CharSequence = seq
override val source: java.lang.CharSequence = new SeqCharSequence(seq)

/** Construct a `PagedSeqReader` with its first element at
* `source(0)` and position `(1,1)`.
Expand Down
Expand Up @@ -19,7 +19,7 @@ import org.junit.Assert.assertEquals

class t7483 {
val s = "foo\nbar"
val reader = new CharSequenceReader(s.toCharArray(), 0)
val reader = new CharSequenceReader(s, 0)
val p = reader.pos.asInstanceOf[OffsetPosition]

@Test
Expand Down

0 comments on commit 1b43999

Please sign in to comment.