Skip to content

adapt to scala/scala#9292 #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ object CharArrayReader {
* @author Martin Odersky
* @author Adriaan Moors
*/
class CharArrayReader(chars: Array[Char], index: Int) extends CharSequenceReader(chars, index) {

def this(chars: Array[Char]) = this(chars, 0)

}
class CharArrayReader(chars: Array[Char], index: Int = 0)
extends CharSequenceReader(java.nio.CharBuffer.wrap(chars), index)
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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