Skip to content

Commit

Permalink
Work around a Scala 2.11 compiler crash with -no-specialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrd committed Jul 23, 2022
1 parent d917d1d commit 2ad751d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion javalib/src/main/scala/java/io/BufferedReader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class BufferedReader(in: Reader, sz: Int) extends Reader {

def this(in: Reader) = this(in, 4096)

private[this] var buf = new Array[Char](sz)
// Workaround 2.11 with no-specialization ; buf should be initialized on the same line
private[this] var buf: Array[Char] = null
buf = new Array[Char](sz)

/** Last valid value in the buffer (exclusive) */
private[this] var end = 0
Expand Down

0 comments on commit 2ad751d

Please sign in to comment.