This bug is related to the #157, but not similar. Consider following code: ``` c# struct Foo { public int Limit { get; set; } public Foo(int limit) : this() { Limit = 42; } public async Task<int> FooAsync() { Contract.Requires(Limit == 42); await Task.Delay(42); return 42; } } ``` Running this code will lead to `InvalidProgramException` when preconditions are enabled. CC version: 1.8+. This is not a regression, this stuff never worked properly. Please note, the if the `Contract.Requires` will use arguments everything would be fine. Only when precondition is using `this` the app will fail.
This bug is related to the #157, but not similar.
Consider following code:
Running this code will lead to
InvalidProgramExceptionwhen preconditions are enabled.CC version: 1.8+. This is not a regression, this stuff never worked properly.
Please note, the if the
Contract.Requireswill use arguments everything would be fine. Only when precondition is usingthisthe app will fail.