Skip to content
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

Source generator should work on internal classes, too #130

Closed
cytoph opened this issue Nov 7, 2022 · 2 comments · Fixed by #141
Closed

Source generator should work on internal classes, too #130

cytoph opened this issue Nov 7, 2022 · 2 comments · Fixed by #141

Comments

@cytoph
Copy link

cytoph commented Nov 7, 2022

The source generator could easily find out the visibility of the class and use the same visibility for the generated partial class code. So why is it necessary for the class public?

@dnperfors
Copy link
Contributor

The source generator specifically creates a public partial class, if the public is removed, the type would get the visibility of the one that actually specifies the visibility...
I wouldn't mind creating a PR for this.

@cytoph
Copy link
Author

cytoph commented Feb 26, 2023

I didn't know that was possible (omitting the visibility so it uses the visibility of another part of the class where it is set). If so, that of course would be an option, too.

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

Successfully merging a pull request may close this issue.

2 participants