Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Godin
Copy link
Member

@Godin Godin commented Aug 24, 2025

Fixes #1938
Closes #1939

@Godin Godin added this to the 0.8.14 milestone Aug 24, 2025
@Godin Godin self-assigned this Aug 24, 2025
@Godin Godin added this to Filtering Aug 24, 2025
@github-project-automation github-project-automation bot moved this to Awaiting triage in Filtering Aug 24, 2025
@Godin Godin moved this from Awaiting triage to In Progress in Filtering Aug 24, 2025
@Godin Godin marked this pull request as ready for review August 24, 2025 22:39
@Godin Godin enabled auto-merge (squash) August 24, 2025 22:39
@Godin Godin requested review from leveretka and marchof August 24, 2025 22:39
}
}

private static void executedWithSameHashCodeAsFirstCase(Object s) {
Copy link
Member

Choose a reason for hiding this comment

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

I was a bit confused by the method name until I saw the call site.

executedWithSameHashCodeAsFirstCase("\0a");

As is is only called here the parameter can be removed? To avoid that the compiler handles the constant directly we can introduce Stub.identity(String).

} // assertEmpty()
} // assertFullyCovered()

private fun executedWithSameHashCodeAsFirstCase(s: String) {
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as above: If we only have one use case we don't need a parameter.

@marchof
Copy link
Member

marchof commented Aug 26, 2025

@Godin As the original issue is Kotlin specific: Can we add a validation test for Kotlin?

@Godin
Copy link
Member Author

Godin commented Aug 26, 2025

Can we add a validation test for Kotlin?

@marchof already added - see commit fafcdf1 that changes KotlinWhenStringTarget.kt 😉

@Godin Godin requested a review from marchof August 27, 2025 08:08
@Godin Godin merged commit 959b098 into jacoco:master Aug 27, 2025
36 checks passed
@Godin Godin deleted the fix_issue_1938 branch August 27, 2025 17:34
@github-project-automation github-project-automation bot moved this from In Progress to Done in Filtering Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

KotlinWhenStringFilter assigns incorrect branch indices for replacement branches

2 participants