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)
410case ErrorCode.WRN_UnobservedAwaitableExpression: 1565or 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) 8414Diagnostic(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)
1695Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1698Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1701Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1704Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1707Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1710Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1713Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F2(false)")); 1744Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1784Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1787Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1790Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1835Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1838Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "bar()"), 1841Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1884Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MethExt()").WithLocation(19, 9), 1887Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo(1)").WithLocation(20, 9)); 1926Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1932Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1972Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1978Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2037Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2040Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2043Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2046Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2049Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2161Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2164Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2167Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2170Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(new MyDisp())"), 2173Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Task.Run(async () => 2220Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2223Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2226Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)2)")); 2283Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.Meth(1)"), 2286Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2289Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"i.Meth("""")"), 2292Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2295Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2349Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2352Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2355Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)null)")); 2397Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""", null)").WithLocation(19, 9), 2400Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(Task.Run(async () => 1), Meth(1))").WithLocation(25, 9) 2450Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(await Meth(int.MaxValue) + 1)"), 2453Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(long.MinValue - 1)"), 2456Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((int?)null)")); 2533Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2582Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2585Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((float?)null)"), 2588Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2591Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(5m)"), 2594Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2597Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((string)null)")); 2648Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()"), 2651Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth((float?)null)"), 2654Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth(1)"), 2657Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth<decimal>()"), 2660Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()")); 2689Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2724Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "s.ExMeth()")); 2762Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2765Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2812Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2889Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "del(y)")); 3045Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(21, 13), 3048Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(26, 13)); 3090Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 3124Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 3127Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Goo()")); 3141Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3144Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3161Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3164Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3876Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3879Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3882Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "YAsync()"), 3885Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()") 3990Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(7, 1), 3993Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 1), 3996Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(10, 47), 3999Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(11, 19), 4002Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(12, 47), 4005Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(15, 1), 4008Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(16, 1), 4011Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(18, 47), 4014Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(20, 47), 4017Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(31, 9), 4020Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(32, 9), 4023Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(34, 55), 4026Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(35, 27), 4029Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(36, 55), 4032Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(39, 9), 4035Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(40, 9), 4038Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(42, 55), 4041Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(44, 55) 4092Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4095Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4098Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4101Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4104Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1), 4107Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(20, 5) 4151Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4154Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4157Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4160Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4163Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1)