The problem in compiling visibility to bytecode modifiers when qualifying visibility with a package lies with our notion of package nesting, whereas Java does not consider packages `a.foo` and `a.bar` related in any way.
Yep, I totally get that. And I think that is why Scala can't simply translate private[a] into default visibility. Thus my annotation proposal. If there is another keyword or way this can be indicated to Scalac, that'd be great. I'm not at all tied to using annotations. It was intended to be illustrative.
As for protected, aren't protected and protected[this] in scala at least as strict as protected in java? So in those cases it would be possible to emit a protected modifier?
Agreed, I believe it orthogonal to default visibility. My annotation proposal was crafted in the interest of backwards compatibility. As mentioned above, I have zero attachment to it being done this specific way.
Perhaps I should have filed these as separate tickets, but I didn't know enough about the compiler to have a good sense.
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.