diff --git a/src/DotNext.Metaprogramming/Runtime/CompilerServices/AsyncStateMachineBuilder.cs b/src/DotNext.Metaprogramming/Runtime/CompilerServices/AsyncStateMachineBuilder.cs index fff5d8b77..1fc689733 100644 --- a/src/DotNext.Metaprogramming/Runtime/CompilerServices/AsyncStateMachineBuilder.cs +++ b/src/DotNext.Metaprogramming/Runtime/CompilerServices/AsyncStateMachineBuilder.cs @@ -560,7 +560,7 @@ private static MemberExpression[] CreateStateHolderType(Type returnType, bool us builder.Add(type); } - slots = builder.Build(sm.Build, out _); + slots = builder.Build(sm.Build, out _); } Debug.Assert(sm.StateMachine is not null); diff --git a/src/DotNext.Tests/Metaprogramming/LambdaTests.cs b/src/DotNext.Tests/Metaprogramming/LambdaTests.cs index 133b6ac69..9ebe78bc7 100644 --- a/src/DotNext.Tests/Metaprogramming/LambdaTests.cs +++ b/src/DotNext.Tests/Metaprogramming/LambdaTests.cs @@ -98,13 +98,12 @@ public static void SimpleAsyncLambda(bool usePooling) } [Theory] - [InlineData(false)] - [InlineData(true)] - public static void SimpleUntypedAsyncLambda(bool usePooling) + [InlineData(AsyncLambdaFlags.None)] + [InlineData(AsyncLambdaFlags.UseTaskPooling)] + public static void SimpleUntypedAsyncLambda(AsyncLambdaFlags flags) { var sumMethod = typeof(LambdaTests).GetMethod(nameof(Sum), BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.DeclaredOnly); - var flags = usePooling ? AsyncLambdaFlags.UseTaskPooling : AsyncLambdaFlags.None; - var lambda = AsyncLambda(new[] { typeof(long), typeof(long) }, typeof(long), flags, fun => + var lambda = AsyncLambda([typeof(long), typeof(long)], typeof(long), flags, fun => { var (arg1, arg2) = fun; var temp = DeclareVariable("tmp");