diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-11 05:19:47 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-11 05:19:47 +0000 |
commit | 19b12e8e0fa68ae922cfbc405815698859e106f0 (patch) | |
tree | cd5f9885a850a75c7dd11a51de9b021213c5affa /src/compiler | |
parent | 82770a97b82f07a1cbbf133c123e4e5aa982d336 (diff) | |
download | scala-19b12e8e0fa68ae922cfbc405815698859e106f0.tar.gz scala-19b12e8e0fa68ae922cfbc405815698859e106f0.tar.bz2 scala-19b12e8e0fa68ae922cfbc405815698859e106f0.zip |
Unsuppressed generic signatures for members wit...
Unsuppressed generic signatures for members with expanded names. Closes
#3897, review by dragos.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 160ce03a7f..7d216dc3aa 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -491,12 +491,15 @@ abstract class GenJVM extends SubComponent { nannots } + // @M don't generate java generics sigs for (members of) implementation classes, as they are monomorphic (TODO: ok?) private def noGenericSignature(sym: Symbol) = ( - sym.isSynthetic || - sym.isLiftedMethod || - (sym hasFlag Flags.EXPANDEDNAME) || - // @M don't generate java generics sigs for (members of) implementation classes, as they are monomorphic (TODO: ok?) - (sym.ownerChain exists (_.isImplClass)) + // PP: This condition used to include sym.hasExpandedName, but this leads to the total loss + // of generic information if a private member is accessed from a closure: both the field and + // the accessor were generated without it. This is particularly bad because the availability + // of generic information could disappear as a consequence of a seemingly unrelated change. + sym.isSynthetic + || sym.isLiftedMethod + || (sym.ownerChain exists (_.isImplClass)) ) def addGenericSignature(jmember: JMember, sym: Symbol, owner: Symbol) { if (noGenericSignature(sym)) () |