Re: unittest + struct ctorю + nested mixin template + alias

2013-05-07 Thread ref2401
i'm using VisualD. this assertion fails assert(msg == "Null reference message"); in my actual code instead of variable _message an exception is thrown if (obj is null) == true. i'm using the unittest block to test exception throwing. ... this(T obj) { if (obj is

Re: unittest + struct ctorю + nested mixin template + alias

2013-05-07 Thread Steven Schveighoffer
On Tue, 07 May 2013 10:58:09 -0400, ref2401 wrote: Version D 2.062 class MyClass {} struct MyStruct(T) if (is(T == class)) { string _message = "nothing"; this(T obj) { if (obj is null){ _message = "Null reference message";