-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deconstruct and fully qualified types in async foreach (#68)
* Fix deconstruct and fully qualified types in async foreach * Move tests
- Loading branch information
1 parent
28761db
commit a3d7afb
Showing
4 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...Tests/Snapshots/SystemAsyncExtensionsTests.AsyncForEachDeconstruct#SumAsync.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//HintName: Test.Class.SumAsync.g.cs | ||
int Sum(global::System.Collections.Generic.IEnumerable<(int a, int b)> enumerable) | ||
{ | ||
int sum = 0; | ||
|
||
foreach (var (a, b) in enumerable) | ||
{ | ||
sum += a + b; | ||
} | ||
|
||
return sum; | ||
} |
15 changes: 15 additions & 0 deletions
15
...r.Tests/Snapshots/SystemAsyncExtensionsTests.AsyncForEachQualified#SumAsync.g.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//HintName: Test.Class.SumAsync.g.cs | ||
int Sum(global::System.Collections.Generic.IEnumerable<int?> enumerable) | ||
{ | ||
int sum = 0; | ||
|
||
foreach (int? i in enumerable) | ||
{ | ||
if (i.HasValue) | ||
{ | ||
sum += i.Value; | ||
} | ||
} | ||
|
||
return sum; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters