import std.traits : isAssignable; struct MyStruct { static assert(isAssignable!MyStruct); // fails, but passes if the following line is removed static if (isAssignable!MyStruct) {} } The assertion fails (wrongly IMO), but passes if the following static-if is removed. Using DMD32 v2.074.0 or LDC2 v1.1.1 (based on DMD v2.071.2). See also https://issues.dlang.org/show_bug.cgi?id=17445
I cannot reproduce this. The assert passes with and without the static if. Closing as WORKSFORME.