-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Packaged macro that accesses protected definitions emits access errors #12948
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
Comments
Looking at the "Semantics-Preserving Inlining for Metaprogramming" it's correct that |
Yes, it should work. We should use part of what is in |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 28, 2021
This adds inline accessors for private/protected members if needed as we do with inline defs. Fixes scala#8208 Fixes scala#12948
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 28, 2021
This adds inline accessors for private/protected members if needed as we do with inline defs. Fixes scala#8208 Fixes scala#12948
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 29, 2021
This adds inline accessors for private/protected members if needed as we do with inline defs. Fixes scala#8208 Fixes scala#12948
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Jul 30, 2021
This adds inline accessors for private/protected members if needed as we do with inline defs. Fixes scala#8208 Fixes scala#12948
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Aug 2, 2021
This adds inline accessors for private/protected members if needed as we do with inline defs. Fixes scala#8208 Fixes scala#12948
tanishiking
pushed a commit
to tanishiking/scala3
that referenced
this issue
Aug 10, 2021
This adds inline accessors for private/protected members if needed as we do with inline defs. Fixes scala#8208 Fixes scala#12948
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Access modifiers are treated transparently through a packaged macro inlining, so a a protected method that is not protected for the macro itself is still considered protected when inlined and we get illegal access error.
Compiler version
v3.0.1-RC2 (also tested on nightly)
Minimized code
See minimized project at: https://github.com/soronpo/dottybug/tree/inline_illegal_access
mylib/Main.scala
Test.scala
Output
Expectation
No error.
The text was updated successfully, but these errors were encountered: