varcomp=CSharpTestBaseBase.CreateCompilation(source,new[]{MscorlibRef},TestOptions.ReleaseDll);// NOTE: 4.0, not 4.5, so it's missing the async helpers.
varcomp=CSharpTestBase.CreateCompilation(source,new[]{MscorlibRef},TestOptions.ReleaseDll);// NOTE: 4.0, not 4.5, so it's missing the async helpers.
// CONSIDER: It would be nice if we didn't squiggle the whole method body, but this is a corner case.
comp.VerifyEmitDiagnostics(
...
...
@@ -3147,7 +3147,7 @@ class C
{
async Task M() {}
}";
varcomp=CSharpTestBaseBase.CreateCompilation(source,new[]{MscorlibRef},TestOptions.ReleaseDll);// NOTE: 4.0, not 4.5, so it's missing the async helpers.
varcomp=CSharpTestBase.CreateCompilation(source,new[]{MscorlibRef},TestOptions.ReleaseDll);// NOTE: 4.0, not 4.5, so it's missing the async helpers.
comp.VerifyEmitDiagnostics(
// (4,16): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
// async Task M() {}
...
...
@@ -3178,7 +3178,7 @@ class C
{
async Task<int> F() => 3;
}";
varcomp=CSharpTestBaseBase.CreateCompilation(source,new[]{MscorlibRef},TestOptions.ReleaseDll);// NOTE: 4.0, not 4.5, so it's missing the async helpers.
varcomp=CSharpTestBase.CreateCompilation(source,new[]{MscorlibRef},TestOptions.ReleaseDll);// NOTE: 4.0, not 4.5, so it's missing the async helpers.
comp.VerifyEmitDiagnostics(
// (4,21): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.