Re: Issue with contracts and assertions

2014-05-23 Thread Andre via Digitalmars-d-learn
Am 23.05.2014 16:44, schrieb Rene Zwanenburg: On Friday, 23 May 2014 at 14:38:27 UTC, Andre wrote: Am 23.05.2014 16:34, schrieb Rene Zwanenburg: In case there is a reason that the assertion is not run, if feels very dangerous for me that all assertions can be disabled by mistake just by adding a

Re: Issue with contracts and assertions

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 14:38:27 UTC, Andre wrote: Am 23.05.2014 16:34, schrieb Rene Zwanenburg: In case there is a reason that the assertion is not run, if feels very dangerous for me that all assertions can be disabled by mistake just by adding an interface to a class. At least a compiler me

Re: Issue with contracts and assertions

2014-05-23 Thread Andre via Digitalmars-d-learn
Am 23.05.2014 16:34, schrieb Rene Zwanenburg: On Friday, 23 May 2014 at 13:45:07 UTC, Andre wrote: Hi, for the attached code I noticed some strange behaviors. I compile the programm with: dmd main -unittest The expected assertion of the method c pre condition is not raised. It is only raised if

Re: Issue with contracts and assertions

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 13:45:07 UTC, Andre wrote: Hi, for the attached code I noticed some strange behaviors. I compile the programm with: dmd main -unittest The expected assertion of the method c pre condition is not raised. It is only raised if class A not implements interface I. On the ot

Issue with contracts and assertions

2014-05-23 Thread Andre via Digitalmars-d-learn
Hi, for the attached code I noticed some strange behaviors. I compile the programm with: dmd main -unittest The expected assertion of the method c pre condition is not raised. It is only raised if class A not implements interface I. On the otherside the commented assertion in the invariant is wo