117 references to WRN_UnobservedAwaitableExpression
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Statements.cs (1)
684Error(diagnostics, ErrorCode.WRN_UnobservedAwaitableExpression, expression.Syntax);
Errors\ErrorFacts.cs (2)
405case ErrorCode.WRN_UnobservedAwaitableExpression: 1554or ErrorCode.WRN_UnobservedAwaitableExpression
Generated\ErrorFacts.Generated.cs (1)
149case ErrorCode.WRN_UnobservedAwaitableExpression:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\CodeGenAsyncSpillTests.cs (6)
2341Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "t.Run(6)").WithLocation(63, 9) 6058Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "t.Run()").WithLocation(61, 9) 6449Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "tc.Run()").WithLocation(48, 9) 6726Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "t.Run()").WithLocation(52, 9) 7623Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "t.Run()").WithLocation(65, 9) 8417Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "M()").WithLocation(16, 9)
CodeGen\CodeGenDeconstructTests.cs (1)
6684Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "System.Threading.Tasks.Task.Delay(new System.TimeSpan(0))").WithLocation(6, 9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (106)
Semantics\BindingAsyncTests.cs (106)
1680Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1683Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1686Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1689Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1692Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1695Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1698Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F2(false)")); 1729Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1769Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1772Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1775Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1820Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1823Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "bar()"), 1826Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1869Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MethExt()").WithLocation(19, 9), 1872Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo(1)").WithLocation(20, 9)); 1911Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1917Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1957Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1963Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2022Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2025Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2028Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2031Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2034Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2146Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2149Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2152Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2155Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(new MyDisp())"), 2158Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Task.Run(async () => 2205Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2208Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2211Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)2)")); 2268Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.Meth(1)"), 2271Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2274Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"i.Meth("""")"), 2277Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2280Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2334Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2337Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2340Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)null)")); 2382Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""", null)").WithLocation(19, 9), 2385Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(Task.Run(async () => 1), Meth(1))").WithLocation(25, 9) 2435Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(await Meth(int.MaxValue) + 1)"), 2438Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(long.MinValue - 1)"), 2441Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((int?)null)")); 2518Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2567Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2570Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((float?)null)"), 2573Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2576Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(5m)"), 2579Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2582Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((string)null)")); 2633Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()"), 2636Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth((float?)null)"), 2639Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth(1)"), 2642Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth<decimal>()"), 2645Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()")); 2674Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2709Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "s.ExMeth()")); 2747Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2750Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2797Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2874Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "del(y)")); 3030Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(21, 13), 3033Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(26, 13)); 3075Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 3109Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 3112Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Goo()")); 3126Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3129Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3146Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3149Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3861Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3864Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3867Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "YAsync()"), 3870Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()") 3975Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(7, 1), 3978Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 1), 3981Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(10, 47), 3984Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(11, 19), 3987Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(12, 47), 3990Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(15, 1), 3993Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(16, 1), 3996Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(18, 47), 3999Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(20, 47), 4002Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(31, 9), 4005Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(32, 9), 4008Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(34, 55), 4011Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(35, 27), 4014Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(36, 55), 4017Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(39, 9), 4020Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(40, 9), 4023Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(42, 55), 4026Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(44, 55) 4077Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4080Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4083Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4086Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4089Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1), 4092Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(20, 5) 4136Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4139Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4142Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4145Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4148Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1)