it would be sometimes nice to be able to use expressions and statements inside the compiles block: ``` int c = 5; static assert(!__traits(compiles,int* cMutable = &c)); ``` I understand if the rationale was to keep `compiles` simple, because most things can be done with expressions. Anyway, e.g. for teaching this is quite nice: https://github.com/stonemaster/dlang-tour/pull/144
actually, most of the time you can do that with this: __traits(compiles,{int* cMutable = &c;}) just use lambda syntax -- we have many of 'em in D. ;-)
Yes, it works, you just need to use a block statement.