aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/tasty
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-04-06 18:28:50 +0200
committerGitHub <noreply@github.com>2017-04-06 18:28:50 +0200
commit49a18da629d74a6f8d4052c95ce8b967ea08f73d (patch)
treef2dc4e1a5f66ab9b7225d3dc69964f78ef2b949d /compiler/src/dotty/tools/dotc/core/tasty
parent09cc23726069fa04cbfeec55a9fa4bb8e4a02ff9 (diff)
parent9191d636138a025c9967c11e37900dacf0bab1c2 (diff)
downloaddotty-49a18da629d74a6f8d4052c95ce8b967ea08f73d.tar.gz
dotty-49a18da629d74a6f8d4052c95ce8b967ea08f73d.tar.bz2
dotty-49a18da629d74a6f8d4052c95ce8b967ea08f73d.zip
Merge pull request #2187 from dotty-staging/fix-2166
fix #2166: unpickling of shared CaseDef
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/tasty')
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
index 4db995e10..a186d1ce4 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
@@ -1059,7 +1059,13 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table, posUnpickle
}
def readCases(end: Addr)(implicit ctx: Context): List[CaseDef] =
- collectWhile(nextByte == CASEDEF && currentAddr != end) { readCase()(ctx.fresh.setNewScope) }
+ collectWhile((nextByte == CASEDEF || nextByte == SHARED) && currentAddr != end) {
+ if (nextByte == SHARED) {
+ readByte()
+ forkAt(readAddr()).readCase()(ctx.fresh.setNewScope)
+ }
+ else readCase()(ctx.fresh.setNewScope)
+ }
def readCase()(implicit ctx: Context): CaseDef = {
val start = currentAddr