aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/core/pickling/TastyPrinter.scala3
-rw-r--r--src/dotty/tools/dotc/core/pickling/TastyUnpickler.scala2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala b/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala
index 58e2499b3..a4d1554f8 100644
--- a/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala
+++ b/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala
@@ -9,8 +9,7 @@ import TastyUnpickler._
class TastyPrinter(bytes: Array[Byte])(implicit ctx: Context) {
- val reader = new TastyReader(bytes)
- val unpickler = new TastyUnpickler(reader)
+ val unpickler = new TastyUnpickler(bytes)
import unpickler.{tastyName, unpickled}
def nameToString(name: TastyName): String = name match {
diff --git a/src/dotty/tools/dotc/core/pickling/TastyUnpickler.scala b/src/dotty/tools/dotc/core/pickling/TastyUnpickler.scala
index f107c7c83..422ce292a 100644
--- a/src/dotty/tools/dotc/core/pickling/TastyUnpickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/TastyUnpickler.scala
@@ -19,6 +19,8 @@ import TastyUnpickler._
class TastyUnpickler(reader: TastyReader) {
import reader._
+ def this(bytes: Array[Byte]) = this(new TastyReader(bytes))
+
private val sectionReader = new mutable.HashMap[String, TastyReader]
val tastyName = new TastyName.Table