-
Notifications
You must be signed in to change notification settings - Fork 3
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
Correctly emit protected constructors #92
Correctly emit protected constructors #92
Conversation
@@ -756,6 +756,7 @@ public boolean requiresProtectedConstructor() { | |||
element.getEnclosedElements().stream() | |||
.map(enclosedElement -> TsElement.of(enclosedElement, env)) | |||
.filter(TsElement::isConstructor) | |||
.filter(tsElement -> !tsElement.isPrivate()) |
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.
as long as you're in here, wouldnt it make more sense to also move the isIgnored
filter here - functionally, we filter out ignored and private constructors in the same way (and this list isn't used anywhere else).
Don't even need the list property then, just a findAny().isPresent() to assign to allIgnored?
if a class has a private constructors and all other constructors are ignored, we should be emitting a protected constructor. currently we dont since we dont filter for private constructors. this commit should fix that
f1483f2
to
7a4cdc8
Compare
if a class has a private constructors and all other constructors are ignored, we should be emitting a protected constructor. currently we dont since we dont filter for private constructors. this commit should fix that (cherry picked from commit 017556c)
if a class has a private constructors and all other constructors are ignored, we should be emitting a protected constructor. currently we dont since we dont filter for private constructors. this commit should fix that (cherry picked from commit 017556c)
if a class has a private constructors and all other constructors are ignored, we should be emitting a protected constructor. currently we dont since we dont filter for private constructors. this commit should fix that (cherry picked from commit 017556c)
if a class has a private constructors and all other constructors are ignored, we should be emitting a protected constructor. currently we dont since we dont filter for private constructors. this commit should fix that