111 references to WRN_UnobservedAwaitableExpression
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Statements.cs (1)
679Error(diagnostics, ErrorCode.WRN_UnobservedAwaitableExpression, expression.Syntax);
Errors\ErrorFacts.cs (2)
392case ErrorCode.WRN_UnobservedAwaitableExpression: 1494case 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)
1606Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1609Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1612Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1615Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1618Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1621Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F1()"), 1624Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "F2(false)")); 1655Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1695Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1698Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1701Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1749Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1752Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "bar()"), 1761Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 1804Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MethExt()").WithLocation(19, 9), 1807Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo(1)").WithLocation(20, 9), 1858Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1867Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1910Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1919Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 1981Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 1984Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 1987Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 1990Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 1993Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2105Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2108Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(x)"), 2111Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2114Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(new MyDisp())"), 2117Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Task.Run(async () => 2164Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2167Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2170Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)2)"), 2230Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.Meth(1)"), 2233Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "f()"), 2236Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"i.Meth("""")"), 2239Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "ff()"), 2242Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "(await ff())()")); 2296Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2299Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2302Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((decimal?)null)")); 2344Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""", null)").WithLocation(19, 9), 2347Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(Task.Run(async () => 1), Meth(1))").WithLocation(25, 9), 2402Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(await Meth(int.MaxValue) + 1)"), 2405Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(long.MinValue - 1)"), 2408Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((int?)null)")); 2485Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2536Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2539Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((float?)null)"), 2542Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"), 2545Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(5m)"), 2548Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, @"Meth("""")"), 2551Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth((string)null)")); 2602Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()"), 2605Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth((float?)null)"), 2608Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth(1)"), 2611Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth<decimal>()"), 2614Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "testB.Meth2()")); 2643Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2678Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "s.ExMeth()")); 2716Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 2719Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2766Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 2843Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "del(y)")); 3002Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(21, 13), 3005Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Meth()").WithLocation(26, 13)); 3047Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()")); 3081Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Goo()"), 3084Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "test.Goo()")); 3098Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3101Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3118Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(1)").WithLocation(2, 1), 3121Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Task.FromResult(2)").WithLocation(3, 1)); 3839Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3842Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3845Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "YAsync()"), 3848Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "XAsync()"), 3960Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(7, 1), 3963Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 1), 3966Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(10, 47), 3969Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(11, 19), 3972Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(12, 47), 3975Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(15, 1), 3978Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(16, 1), 3981Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(18, 47), 3984Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(20, 47), 3987Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(31, 9), 3990Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(32, 9), 3993Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(34, 55), 3996Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(35, 27), 3999Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(36, 55), 4002Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(39, 9), 4005Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(40, 9), 4008Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(42, 55), 4011Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(44, 55) 4062Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.M()").WithLocation(5, 1), 4065Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(6, 1), 4068Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(8, 19), 4071Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.M()").WithLocation(11, 1), 4074Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "i.MAsync()").WithLocation(12, 1), 4077Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "c.MAsync()").WithLocation(20, 5) 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)