Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a2024d

Browse files
Fix not excluded branchpoints in async state machine (#1745)
* init * update changelog + bump sdk
1 parent 47cdd27 commit 0a2024d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

‎Documentation/Changelog.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## Unreleased
88

99
### Fixed
10-
- use `<TargetFramework>netstandard2.0</TargetFramework>` for _coverlet.collector_ and _coverlet.msbuild.tasks_ Packages ́
10+
- Fix branchpoint exclusion for sdk 8.0.407 [#1741](https://github.com/coverlet-coverage/coverlet/issues/1741)
11+
- Use `<TargetFramework>netstandard2.0</TargetFramework>` for _coverlet.collector_ and _coverlet.msbuild.tasks_ Packages ́
1112

1213
### Improvements
13-
- use [xunit.v3](https://xunit.net/docs/getting-started/v3/whats-new) for tests and example code
14+
- Use [xunit.v3](https://xunit.net/docs/getting-started/v3/whats-new) for tests and example code
1415

1516

1617
## Release date 2024年01月20日

‎global.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.113"
3+
"version": "8.0.407"
44
}
55
}

‎src/coverlet.core/Symbols/CecilSymbolHelper.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Linq;
88
using System.Runtime.CompilerServices;
99
using System.Text.RegularExpressions;
10+
using System.Threading.Tasks;
1011
using Coverlet.Core.Abstractions;
1112
using Coverlet.Core.Extensions;
1213

@@ -733,7 +734,7 @@ static bool CheckForSkipDisposal(List<Instruction> instructions, Instruction ins
733734
field.Equals(reloadedField) &&
734735
instructions[i + 1].OpCode == OpCodes.Callvirt &&
735736
instructions[i + 1].Operand is MethodReference method &&
736-
method.DeclaringType.FullName == "System.IAsyncDisposable" &&
737+
method.ReturnType.FullName == typeof(ValueTask).FullName &&
737738
method.Name == "DisposeAsync")
738739
{
739740
isFollowedByDisposeAsync = true;
@@ -755,7 +756,7 @@ static bool CheckForSkipDisposal(List<Instruction> instructions, Instruction ins
755756
instructions[currentIndex - 1].OpCode == OpCodes.Ldloc_3) &&
756757
instructions[currentIndex + 2].OpCode == OpCodes.Callvirt &&
757758
instructions[currentIndex + 2].Operand is MethodReference method &&
758-
method.DeclaringType.FullName == "System.IAsyncDisposable" &&
759+
method.ReturnType.FullName == typeof(ValueTask).FullName &&
759760
method.Name == "DisposeAsync")
760761
{
761762
isFollowedByDisposeAsync = true;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /