On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote:
[ ... ]
Hi Guys :) I am currently fixing a bug involving complex members of structs (where complex means (slice, struct, array or pointer)) I did expect them to be broken ... but not to be _that_ broken :) struct S { uint[] slice; } uint fn() { S s; s.slice.length = 12; return cast(uint)s.slice.length; } static assert(fn() == 12); This code will not work because s.slice has no elementType :) (which does not mean it has the s.slice[0] has the type void) newCTFE literally looses the type information somewhere. And people wonder why I don't like mondays :)