-
Notifications
You must be signed in to change notification settings - Fork 1.1k
update export.md: clarify that constructor proxies are exported #13339
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
@@ -69,6 +69,7 @@ A member is _eligible_ if all of the following holds: | |||
a base class of the class containing the export clause. | |||
- it is accessible at the export clause, | |||
- it is not a constructor, nor the (synthetic) class part of an object, | |||
- it is a constructor proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That implies that only constructor proxies can be exported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it should have been appended to previous item as a note
But constructor proxies are not the synthetic class part of an object. So the original wording is correct. |
@odersky
There is still this part in the docs:
Aren't constructor proxies also "synthetic members generated by the compiler"? |
Also regarding this part:
Aren't the members, generated by the compiler for Currently, it's allowed to export already-exported members: object Outer1:
object Inner:
def foo = 1
export Inner._
println(foo)
object Outer2:
export Outer1._
println(foo) Maybe this case could also be clarified in the docs? |
Yes, indeed. That sentence needs changing. Maybe:
|
Great! |
…d by an export are also exported
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Currently, the docs say:
However, constructor proxies are exported and they are synthetic
related: #11128