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

Backport "Coverage: mark case bodies as branches; don't ignore branches with synthetic spans" to LTS #19232

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

Kordyjan
Copy link
Contributor

Backports #18437 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

…nthetic spans

Marking bodies of CaseDefs as branches seems like an uncontroversial
change, it was probably an oversight.

Not ignoring synthetic spans when creating coverage calls in branches
seems like a good trade off. There might be some auto-generated `else
()` interpreted as branches, but Scala introduces quite a lot of
synthetic trees that wrap non-synthetic trees (e.g. implicit classes).
Also, it looks like Scala 2 includes those compiler-generated `else`
branches in coverage. (Another possibility here would be to also check
if the span is zero extent, but that approach would be different to the
Scala 2 one)

partial fix for lampepfl#16634

[Cherry-picked bcb2053]
@Kordyjan
Copy link
Contributor Author

No regressions detected in the community build up to lts-18932.

Reference

@Kordyjan Kordyjan merged commit 0b33d5b into release-3.3.2 Dec 13, 2023
19 checks passed
@Kordyjan Kordyjan deleted the lts-18437 branch December 13, 2023 16:31
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 this pull request may close these issues.

2 participants