- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
expanded names
Mon, 2009-03-02, 18:15
Symbols has machinery for providing the expanded name of a setter:
final def setter(base: Symbol): Symbol = setter(base, false)
final def setter(base: Symbol, hasExpandedName: Boolean): Symbol = {
[...]
if (hasExpandedName) sname = base.expandedSetterName(sname)
However there is no similar machinery for getters:
final def getter(base: Symbol): Symbol = {
Is this because getters should not finish up with expanded names, or is
it necessary but missing? I ask because of this bug:
https://lampsvn.epfl.ch/trac/scala/ticket/1722
The broken classfile is apparently a result of disagreement as to the
name of the accessor for private object P - is it C$$P() or P()?
public abstract C$P$ C$$P(); // if P is private - broken classfile
public abstract C$P$ P(); // if P is public - works