On 1/9/15 1:50 PM, John Colvin wrote:On Friday, 9 January 2015 at 18:35:56 UTC, anonymous wrote:On Friday, 9 January 2015 at 18:25:42 UTC, John Colvin wrote:struct S { void* p; }void main() { S s;auto a = cast(void*)s; //Error: e2ir: cannot cast s of type S totype void*This is actually a compiler bug!
So it is! The same happens with e.g. casting void* to string. Annoyingly it passes __traits(compiles, ...)