-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Do not filter out synthetic constructors that contain values of default arguments in Kotlin #888
Conversation
org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java
Outdated
Show resolved
Hide resolved
org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java
Outdated
Show resolved
Hide resolved
@@ -35,6 +35,11 @@ public void filter(final MethodNode methodNode, | |||
return; | |||
} | |||
|
|||
if (KotlinDefaultArgumentsFilter |
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.
Side note: When I see this I more and more like @Godin 's idea to separate filters for different compilers.
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.
@marchof don't know about whom you're talking 😆
Not sure that separation can remove this dependency between filters, i.e. not every but some synthetic
methods anyway should be filtered in Kotlin.
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.
Some minor formal issues from my side.
@marchof fixed, also updated javadoc of filter according to changes, please re-review |
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.
@Godin Thx for adressing the issues!
Similarly to #773 constructors in Kotlin can have default arguments with branches, what unfortunately was overlooked during implementation of #774 - currently we filter them out, because they gets compiled differently than functions:
results in constructor with following signature
This was discovered during implementation of #887.