public partial class Class1
{
[RewriteAsync]
public int Foo() => 10;
}
Try to build the project
This will produce an invalid C# code in GeneratedAsync.cs file:
namespace ClassLibrary3
{
#pragma warning disable
using System;
using System.Threading;
using System.Threading.Tasks;
using global::ClassLibrary3;
public partial class Class1
{
public Task<int> FooAsync()
{
return FooAsync(CancellationToken.None);
}
=> 10;
public async Task<int> FooAsync(CancellationToken cancellationToken) => 10;
}
}
Steps to reproduce:
Shaolinq.AsyncRewriter 1.1.1.989
This will produce an invalid C# code in
GeneratedAsync.cs
file: