-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow overriding protected[Base]
methods
#9814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TFW Travis passes but validate-main fails. I guess spurious due to longer-lived test
The actual diff does not look benign:
Wait, doesn't my test include a |
/rebuild |
fe13497
to
bdfd8f6
Compare
oops, I need a version of |
bdfd8f6
to
6a01197
Compare
LGTM, but I'd like Scala 3 to agree. A PR is the best way to get their attention, would you mind submitting one? |
I will follow up in this PR with spec language and also PR to version 3. |
While adding spec words, I noticed we didn't mention Scala 3 is prepared to allow it, except that the access modifier is currently wrong. "it should be public" (It compiles in the linked PR.) Scala 2 doesn't see the override. "Missing implementation" It seems I tried to understand qualified private a few times since the antepandemic year. I asked about Scala 2's behavior when I noticed that |
6a01197
to
abe2c65
Compare
Since it got bumped from the next milestone, I pushed not name mangling qualified privates. |
The Scala 3 PR was approved, with the limitation on local classes. The broken commit here must be reworked to work without mangling mangling. |
@som-snytt interested in returning to this, now that the Scala 3 PR has been merged? |
"disinterested", perhaps. The error is serialization! OMG. The last commit IIRC had something to do with detecting matching members in the face of mangling. That is, matching was correct without mangling. It's dispiriting when ordinary fixes are derailed by MIMA-style compatibility or similar problems with encodings. Edit: the dispiriting part (now I recall) is that the failure was due to
|
3fedd33
to
3520472
Compare
3520472
to
2cf7d69
Compare
this is passing CI, now. does that mean it's ready for review? |
Is there a label for |
When overriding `protected[C]`, `C` may refer to the enclosing companion of `C`, which provides the same access guarantees. Update spec to allow override protected[C] companion.
2cf7d69
to
e6c8da2
Compare
This commit does not add checkfile autocommit per #9814 (comment) but does add Minor syntax tweaks in first commit since previous "looking good!" comment, and rebase. |
Happy Birthday, PR! |
🍰 I learned "just enough" git and also |
protected[Base]
methods
Fixes scala/bug#12494
This is for the static module case, not for local companions.