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
Skip coverage for methods generated for inline classes #973
Comments
For methods generated in data classes Kotlin compiler does not generate line numbers - see #689 Whereas seems that for inline classes Kotlin compiler
results in following methods (
which IMO does not make any sense, looks like bug in Kotlin compiler (CC @goodwinnk) and leads to the fact that JaCoCo does not filter these methods similarly to ones in data classes and so they show up in report. Thus @mkrussel77 could you please report this to developers of Kotlin compiler in their issue tracker with cross-reference to/from this ticket? |
Moreover following example demonstrates that this affects not only JaCoCo, but also debugger:
after step from breakpoint on line |
@mkrussel77 have you reported this to the developers of Kotlin compiler in their issue tracker? |
I created ticket https://youtrack.jetbrains.com/issue/KT-35553 |
@mkrussel77 thank you! 👍 ❤️ |
THIS IS A BUG TRACKER ONLY. FOR QUESTIONS PLEASE CHECK FAQ OR USE FORUM:
http://www.jacoco.org/jacoco/trunk/doc/faq.html
https://groups.google.com/forum/?fromgroups=#!forum/jacoco
Please understand that
ISSUES WITHOUT FOLLOWING INFORMATION WILL BE CLOSED WITHOUT COMMENTS!
Thank you for filling feature request!
Scenario
Kotlin generates several methods for inline classes similar to how it does for data classes.
Would like inline classes to behave like data classes. I know inline classes are experimental so adding it at this point might cause breakage in the future.
Current Behaviour
All of these methods are reported as unused
Wanted Behaviour
The methods to not be reported as unused
Possible Workarounds
Use data classes instead of inline classes
The text was updated successfully, but these errors were encountered: