Checking function parameters in Phobos

Meta jared771 at gmail.com
Sun Nov 24 23:25:41 PST 2013


On Monday, 25 November 2013 at 07:24:10 UTC, Meta wrote:
> 	auto a = validated!containsFortyTwo(new FortyTwo());
> 	auto b = a;
> 	//Passes
> 	assert(a.i == 42);
> 	assert(b.i == 42);
> 	mutateFortyTwo(a);
> 	//Fails
> 	assert(a.i == 43);
> 	assert(b.i == 43);

"//Fails" should be "//Passes" as well.


More information about the Digitalmars-d mailing list