Skip to content

Idea: Auto-generate private no-args constructor for extension classes #717

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

Open
EotT123 opened this issue May 25, 2025 · 0 comments
Open

Comments

@EotT123
Copy link
Contributor

EotT123 commented May 25, 2025

Extension classes are not meant to be instantiated. A private no-arguments constructor could be automatically generated to prevent instantiation and reduce boilerplate code to write it manually.

Implementation note: To avoid breaking existing behavior, the private constructor should only be generated if the class does not already define any constructors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants