Skip to content

@publicInBinary has now effect on secondary constructors #22630

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

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

hamzaremmal
Copy link
Member

Closes #22498

@@ -102,6 +105,8 @@ class ExpandPrivate extends MiniPhase with IdentityDenotTransformer { thisPhase
override def transformDefDef(tree: DefDef)(using Context): DefDef = {
val sym = tree.symbol
tree.rhs match {
case _ if sym.isConstructor && sym.hasPublicInBinary =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a weird way to write an if condition, but avoids another level of indentation with an if-else expression.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SIP-39 - Uncluttering Abuse of Match

@hamzaremmal hamzaremmal changed the title @publicInBinary has effect on secondary constructors @publicInBinary has now effect on secondary constructors Feb 20, 2025
@hamzaremmal hamzaremmal force-pushed the i22497 branch 2 times, most recently from 6d84032 to b99156e Compare February 20, 2025 21:29
@hamzaremmal hamzaremmal merged commit 93ffd23 into scala:main Feb 21, 2025
28 checks passed
@hamzaremmal hamzaremmal deleted the i22497 branch February 21, 2025 13:50
@Gedochao Gedochao added stat:needs preview Features which may first be released under --preview stat:needs decision Some aspects of this issue need a decision from the maintainance team. labels Feb 24, 2025
@WojciechMazur WojciechMazur added this to the 3.7.0 milestone Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:needs decision Some aspects of this issue need a decision from the maintainance team. stat:needs preview Features which may first be released under --preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@publicInBinary doesn't have any effect on secondary constructors
5 participants