summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-10-26 17:41:42 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2016-10-27 10:42:03 +0200
commit69fc725abf7690ea73a02f44f285d192491468b4 (patch)
tree165d9cf351288249854a2913eee2b97deac32fb4 /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
parent5751763261312bfadabb91b15b3ed826648023af (diff)
downloadscala-69fc725abf7690ea73a02f44f285d192491468b4.tar.gz
scala-69fc725abf7690ea73a02f44f285d192491468b4.tar.bz2
scala-69fc725abf7690ea73a02f44f285d192491468b4.zip
Robustly identify unpickling the current module class
When unpickling a class, if the name and owner matches the current `classRoot` of the unpickling Scan, that `classRoot` symbol is used instead of creating a new symbol. If, in addition, the class being unpickled has the MODULE flag, the unpickler should use the `moduleRoot.moduleClass` symbol (instead of creating a new one). To identify the module class, the current implementation compares the name and owner to the `classRoot`. This fails in case the `classRoot` is `NoSymbol`, which can happen in corner cases (when a type alias shadows a class symbol, scala-dev#248). In this patch we identify the module class by comparing the name and owner to the `moduleRoot` symbol directly (using a `toTypeName`).
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
0 files changed, 0 insertions, 0 deletions