13 references to ERR_WrongArityAsyncReturn
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
2195
or ErrorCode.
ERR_WrongArityAsyncReturn
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
356
F.Diagnostics.Add(ErrorCode.
ERR_WrongArityAsyncReturn
, F.Syntax.Location, builderType);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (3)
624
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, @"{ System.Console.Write(""G ""); await Task.Delay(0); return t; }").WithArguments("MyTaskMethodBuilder").WithLocation(12, 38),
627
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, @"{ System.Console.Write(""M ""); await F(); return await G(3); }").WithArguments("MyTaskMethodBuilder").WithLocation(15, 41)
1508
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "{ await Task.Delay(0); throw null; }").WithArguments("MyTaskMethodBuilder<int>").WithLocation(9, 34)
CodeGen\CodeGenAsyncTests.cs (8)
3553
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "=> await Task.FromResult(1)").WithArguments("N.BG<int>").WithLocation(17, 27),
3568
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "=> await Task.FromResult(1)").WithArguments("N.BN").WithLocation(21, 27),
3577
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "=> await Task.FromResult(1)").WithArguments("G<int>.BG<int>").WithLocation(39, 27),
3583
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "=> await Task.FromResult(1)").WithArguments("G<int>.BN").WithLocation(41, 27),
3589
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "=> await Task.FromResult(1)").WithArguments("G<>.BG<>").WithLocation(43, 27),
3595
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "=> await Task.FromResult(1)").WithArguments("G<>.BN").WithLocation(45, 27),
4034
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "{ await (Task)null; return 1; }").WithArguments("Mismatch1MethodBuilder").WithLocation(5, 30),
5046
Diagnostic(ErrorCode.
ERR_WrongArityAsyncReturn
, "{ await Task.Delay(1000); return string.Empty; }").WithArguments("CustomAsyncTaskMethodBuilder<,>").WithLocation(8, 53)