diff options
author | Martin Odersky <odersky@gmail.com> | 2016-04-07 21:46:10 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-04-07 21:46:10 +0200 |
commit | b3b3f3c31946c69b8ea03af352331482268fc16a (patch) | |
tree | 28d844ad3b907fc0a4e5fc8d285f7423fa286b7f /src/dotty/tools/dotc/core/tasty | |
parent | 3e0be576398673d33ff15a6e117e04c5d5cc016f (diff) | |
download | dotty-b3b3f3c31946c69b8ea03af352331482268fc16a.tar.gz dotty-b3b3f3c31946c69b8ea03af352331482268fc16a.tar.bz2 dotty-b3b3f3c31946c69b8ea03af352331482268fc16a.zip |
Fix reading of SourceFile attribute from Tasty
The previous path name always had a "Simple(...)" wrapped around it.
Diffstat (limited to 'src/dotty/tools/dotc/core/tasty')
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala b/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala index d62762571..6d0e73efb 100644 --- a/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala +++ b/src/dotty/tools/dotc/core/tasty/DottyUnpickler.scala @@ -18,8 +18,10 @@ object DottyUnpickler { class BadSignature(msg: String) extends RuntimeException(msg) class SourceFileUnpickler extends SectionUnpickler[SourceFile]("Sourcefile") { - def unpickle(reader: TastyReader, tastyName: TastyName.Table) = - new SourceFile(tastyName(reader.readNameRef()).toString, Seq()) + def unpickle(reader: TastyReader, tastyName: TastyName.Table) = { + val TastyName.Simple(sourceName) = tastyName(reader.readNameRef()) + new SourceFile(sourceName.toString, Seq()) + } } class TreeSectionUnpickler extends SectionUnpickler[TreeUnpickler]("ASTs") { |