-
Notifications
You must be signed in to change notification settings - Fork 151
CC1099: Contract extraction failed: async/iterator issue in async without await #172
Comments
grabbed. |
@mgaffigan This is a great bug report. Thanks for taking the time to find a simple way to reproduce the problem and explain the variants you tested. 😄 |
Investigation results:
I'm running the tests right now for the fix. |
Created PR with a fix: #173. |
@SergeyTeplyakov, Thank you for the quick response. |
@mgaffigan You're welcome! And thanks a lot for great bug report! |
Bug still presented. Got this error on such a code:
|
@takinosaji, are you use this pre-release or latest? |
@GreenKn1ght nope i am using latest. |
@takinosaji just asking because this fix not released yet =/ |
Adding
|
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.Error:
Code:
The following variations do not trigger the bug:
async
and returningTask.FromResult(false)
&& 1 == 2
DateTime.Now.Day == 0
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.The text was updated successfully, but these errors were encountered: