111 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: 1555or ErrorCode.WRN_UnobservedAwaitableExpression
Generated\ErrorFacts.Generated.cs (1)
150case ErrorCode.WRN_UnobservedAwaitableExpression:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
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)
1656Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1659Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1662Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1665Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1668Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1671Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1674Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F2(false)")); 1705Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1745Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1748Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1751Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1799Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1802Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "bar()"), 1811Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1854Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MethExt()").WithLocation(19, 9), 1857Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo(1)").WithLocation(20, 9), 1908Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1917Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1960Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1969Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2031Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2034Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2037Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2040Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2043Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2155Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2158Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2161Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2164Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(new MyDisp())"), 2167Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Task.Run(async () => 2214Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2217Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2220Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)2)"), 2280Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.Meth(1)"), 2283Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2286Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"i.Meth("""")"), 2289Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2292Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2346Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2349Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2352Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)null)")); 2394Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""", null)").WithLocation(19, 9), 2397Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(Task.Run(async () => 1), Meth(1))").WithLocation(25, 9), 2452Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(await Meth(int.MaxValue) + 1)"), 2455Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(long.MinValue - 1)"), 2458Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((int?)null)")); 2535Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2586Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2589Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((float?)null)"), 2592Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2595Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(5m)"), 2598Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2601Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((string)null)")); 2652Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()"), 2655Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth((float?)null)"), 2658Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth(1)"), 2661Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth<decimal>()"), 2664Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()")); 2693Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2728Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "s.ExMeth()")); 2766Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2769Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2816Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2893Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "del(y)")); 3052Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(21, 13), 3055Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(26, 13)); 3097Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 3131Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 3134Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Goo()")); 3148Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3151Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3168Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3171Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3898Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3901Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3904Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "YAsync()"), 3907Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 4019Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(7, 1), 4022Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 1), 4025Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(10, 47), 4028Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(11, 19), 4031Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(12, 47), 4034Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(15, 1), 4037Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(16, 1), 4040Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(18, 47), 4043Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(20, 47), 4046Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(31, 9), 4049Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(32, 9), 4052Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(34, 55), 4055Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(35, 27), 4058Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(36, 55), 4061Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(39, 9), 4064Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(40, 9), 4067Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(42, 55), 4070Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(44, 55) 4121Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4124Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4127Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4130Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4133Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1), 4136Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(20, 5) 4180Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4183Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4186Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4189Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4192Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1)