37 references to ERR_BadAsyncReturn
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
1475
or ErrorCode.
ERR_BadAsyncReturn
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (1)
367
F.Diagnostics.Add(ErrorCode.
ERR_BadAsyncReturn
, F.Syntax.Location);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1541
diagnostics.Add(ErrorCode.
ERR_BadAsyncReturn
, errorLocation);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (21)
CodeGen\CodeGenAsyncIteratorTests.cs (2)
1523
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "M").WithLocation(5, 60),
2261
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "M").WithLocation(4, 62),
CodeGen\CodeGenAsyncMainTests.cs (3)
835
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "Main").WithLocation(6, 22),
862
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "Main").WithLocation(6, 22),
1195
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "Main").WithLocation(11, 22),
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (4)
621
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, @"{ System.Console.Write(""F ""); await Task.Delay(0); }").WithLocation(9, 29),
1446
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, @"{ System.Console.Write(""F ""); await Task.Delay(0); }").WithLocation(10, 29),
1449
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, @"{ System.Console.Write(""G ""); await Task.Delay(0); return t; }").WithLocation(14, 38),
1452
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, @"{ System.Console.Write(""M ""); await F(); return await G(3); }").WithLocation(18, 34)
CodeGen\CodeGenAsyncTests.cs (12)
3556
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.FromResult(1)").WithLocation(18, 22),
3565
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.FromResult(1)").WithLocation(20, 22),
3580
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.FromResult(1)").WithLocation(40, 22),
3586
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.FromResult(1)").WithLocation(42, 22),
3592
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.FromResult(1)").WithLocation(44, 22),
3598
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.FromResult(1)").WithLocation(46, 22)
3623
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.Delay(1)").WithLocation(9, 17)
3651
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "f").WithLocation(9, 13)
3701
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.Delay(1)").WithLocation(9, 17)
3737
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.Delay(1)").WithLocation(6, 17)
3872
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.Delay(2)").WithLocation(66, 19),
3875
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=> await Task.Delay(3)").WithLocation(67, 19)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (13)
Semantics\BindingAsyncTasklikeMoreTests.cs (4)
784
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "{ }").WithLocation(8, 26));
815
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "f1").WithLocation(13, 14),
818
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "f2").WithLocation(14, 14)
842
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "f").WithLocation(9, 13)
Semantics\BindingAsyncTasklikeTests.cs (3)
331
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "f").WithLocation(6, 18),
349
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "f").WithLocation(6, 18),
450
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "g").WithLocation(5, 30)
Semantics\BindingAsyncTests.cs (5)
289
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "F2"),
292
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "F3"),
295
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "F4"),
298
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "F1"),
3662
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "F1"),
Semantics\LambdaTests.cs (1)
5435
Diagnostic(ErrorCode.
ERR_BadAsyncReturn
, "=>").WithLocation(6, 35),