impure

Dom DiSc dominikus at scherkl.de
Mon Apr 8 07:53:01 UTC 2024


On Monday, 8 April 2024 at 07:03:40 UTC, Alexandru Ermicioi wrote:
> On Sunday, 24 March 2024 at 07:41:41 UTC, Dom DiSc wrote:
>> I'm creating a library that is completely pure, but it doesn't 
>> compile with pure: at the top because of one impure unittest 
>> (which uses random to  test some things only probabilistic)!
>>
>> So do I really need to declare every function pure 
>> individually because of a test?!?
>>
>> Can we please have a @impure attribute?
>> And by the way also @throws and @gc?
>> That would make live so much easier...
>
> Try `debug unittest {...}`?

Cool. This seems to work. That's a nice workaroud for tests. Yay!


More information about the Digitalmars-d-learn mailing list