Skip to content

Commit f4dfc5a

Browse files
committed
Fix Issue1012 test: use untyped lambda parameter (Sub(i) not Sub(i As Integer))
Parameters with explicit types in lambda expressions produce typed C# parameters like (int i) =>. Using Sub(i) without an As-clause produces the simpler i => form, which is what the test intended to demonstrate. https://claude.ai/code/session_01AkwUvu3XuCdj3D4axoX4UX
1 parent 089612e commit f4dfc5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/CSharp/ExpressionTests/LambdaTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Private Sub BugRepro()
2222
2323
Dim entities As New List(Of MyEntity)
2424
25-
Parallel.For(1, 3, Sub(i As Integer)
25+
Parallel.For(1, 3, Sub(i)
2626
Dim result As String = (From e In entities
2727
Where e.EntityId = 123
2828
Select e.Name).Single
@@ -44,7 +44,7 @@ private void BugRepro()
4444
4545
var entities = new List<MyEntity>();
4646
47-
Parallel.For(1, 3, (i) =>
47+
Parallel.For(1, 3, i =>
4848
{
4949
string result = (from e in entities
5050
where e.EntityId == 123

0 commit comments

Comments
 (0)