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

Fix shadowed branch coverage PC variable #8040

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

alisinabh
Copy link
Contributor

The refactor of coverage code (#8025) is casting a shadow over pc variable for the first branch and results in invalid branch coverage reports.

Motivation

Fix branch coverage reports.

Solution

Use a different name for the jump pc variable to prevent shadowing it for use in the first branch anchor.

@alisinabh alisinabh requested a review from onbjerg as a code owner June 3, 2024 17:08
@alisinabh
Copy link
Contributor Author

@DaniPopes Should we add tests for this? I didn't find any tests related to anchors.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, pending @DaniPopes

@DaniPopes
Copy link
Member

Don't know much about this code so can't say lol, thanks for catching this

@DaniPopes DaniPopes merged commit 590f566 into foundry-rs:master Jun 3, 2024
19 checks passed
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.

3 participants