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

Incorrect Branching On Return Statement #1292

Closed
cro-magnon opened this issue Mar 4, 2022 · 2 comments
Closed

Incorrect Branching On Return Statement #1292

cro-magnon opened this issue Mar 4, 2022 · 2 comments
Labels
declined: duplicate ❌ This issue or pull request already exists

Comments

@cro-magnon
Copy link

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 bug report!

Steps to reproduce

  • JaCoCo version: 0.8.7

  • Operating system: OSX

  • Tool integration: Gradle

  • Example project: https://github.com/cro-magnon/jacoco-bug

  • Steps: (what exactly are you doing with the above reproducer?)
    Just run a ./gradlew clean build
    Navigate to the coverage report file as described in the README.

Expected behaviour

It is a return statement, it should be covered.
There should be no missing branches whatsoever.

Actual behaviour

branch_coverage_bug

@cro-magnon cro-magnon added the type: bug 🐛 Something isn't working label Mar 4, 2022
@cro-magnon
Copy link
Author

Not sure if it's helpful or not, but this same code will pass if the kotlin version is set to 1.5.20. Haven't really tried out any other version. So I don't know if it's some different way the compiled classes are getting generated that makes jacoco see things differently.

@Godin
Copy link
Member

Godin commented Mar 5, 2022

Duplicate of #1266

@Godin Godin marked this as a duplicate of #1266 Mar 5, 2022
@Godin Godin closed this as completed Mar 5, 2022
@Godin Godin added declined: duplicate ❌ This issue or pull request already exists and removed type: bug 🐛 Something isn't working labels Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined: duplicate ❌ This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants