You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
I am getting the error CC1099 on a particular method. I have narrowed the method down to one specific change which will cause the failure. The below sample compiled as a console application with rewriting enabled seems to reliably fail.
using System;
using System.Threading.Tasks;
namespace EmptyAsyncTest
{
class Program
{
static void Main(string[] args)
{
}
async Task Foo()
{
if (DateTime.Now.Day == 0 && 1 == 2)
{
}
}
}
}
The following variations do not trigger the bug:
Removing async and returning Task.FromResult(false)
Removing && 1 == 2
Removing DateTime.Now.Day == 0
Adding await Task.Delay(1)
Environment:
VS 2015 CTP, Code Contracts 1.9.10714.2, Windows 8.1, Project is .Net 4.5, Only rewriting is enabled
Also repro'd by compiling fe3bf15 and running foxtrot. Same output.