I noticed this when looking at LazyAsyncMethodChecks in comparison to LocalFunctionSymbol.ComputeReturnType.
``C#
public class C
{
async ref System.Threading.Tasks.Task M() { } // error CS1073 (badref` token)
public void M2()
{
async ref System.Threading.Tasks.Task M() { } // no error
}
}
```
FYI @jaredpar I intend to fix this as part of async-streams work. Let me know if you think this should be fixed sooner.
Think this is fine to fix for dev16
The example in the description above hits a Debug.Assert in the emitter.
http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/CodeGen/EmitStatement.cs,730
@RikkiGibson I just realized that I've fixed this issue already (in a feature branch which I'm about to merge back to trunk). Sorry about that.
I'll go ahead and close.
If you're curious the fix is here: https://github.com/dotnet/roslyn/pull/29741/files#diff-ae5907044cfb4d86b6675da5718d9aafR217
Most helpful comment
@RikkiGibson I just realized that I've fixed this issue already (in a feature branch which I'm about to merge back to trunk). Sorry about that.
I'll go ahead and close.