diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-11-29 14:40:59 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-11-29 14:48:53 +1000 |
commit | b47aaf6445afe4a6818c31a0ed10e680e6b82c24 (patch) | |
tree | 6594622674e008021d083b9c14b829c6022e2d81 /src/reflect/scala/reflect/internal/pickling | |
parent | 2bc92e0b2fa9f6de2b2a6c8f9ef4b85492e7df4d (diff) | |
download | scala-b47aaf6445afe4a6818c31a0ed10e680e6b82c24.tar.gz scala-b47aaf6445afe4a6818c31a0ed10e680e6b82c24.tar.bz2 scala-b47aaf6445afe4a6818c31a0ed10e680e6b82c24.zip |
SI-8502 Rework handling of stub symbols in unpickler
- Rework previous fixes for SI-8502 to move the creation of
a term or type stub symbol during unpickling to the initial
point of stub creation, based on the tag.
- Just set the PACKAGE flag on class stub symbols created during
unpickling `ThisType`, rather than bothering with a different
subclass of `StubSymbol` for (assumed) packages.
Diffstat (limited to 'src/reflect/scala/reflect/internal/pickling')
-rw-r--r-- | src/reflect/scala/reflect/internal/pickling/UnPickler.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/internal/pickling/UnPickler.scala b/src/reflect/scala/reflect/internal/pickling/UnPickler.scala index 6dea184826..3bc845557f 100644 --- a/src/reflect/scala/reflect/internal/pickling/UnPickler.scala +++ b/src/reflect/scala/reflect/internal/pickling/UnPickler.scala @@ -267,7 +267,8 @@ abstract class UnPickler { |because it (or its dependencies) are missing. Check your build definition for |missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) |A full rebuild may help if '$filename' was compiled against an incompatible version of ${owner.fullName}.$advice""".stripMargin - owner.newStubSymbol(name, missingMessage) + val stubName = if (tag == EXTref) name else name.toTypeName + owner.newStubSymbol(stubName, missingMessage) } } } @@ -392,9 +393,7 @@ abstract class UnPickler { def readThisType(): Type = { val sym = readSymbolRef() match { - case stub: StubSymbol if !stub.isClass => - // SI-8502 This allows us to create a stub for a unpickled reference to `missingPackage.Foo`. - stub.owner.newStubSymbol(stub.name.toTypeName, stub.missingMessage, isPackage = true) + case stub: StubSymbol => stub.setFlag(PACKAGE) case sym => sym } ThisType(sym) |