It is bug 7038 and has been fixed in 2.059.
http://d.puremagic.com/issues/show_bug.cgi?id=7038
Kenji Hara
I believe all of these static assertions (and some variants thereof) should pass, due to the semantics of const, immutable, and shared.
immutable struct Immutable { }
const struct Const { }
shared struct Shared { }
static assert(is(Immutable == immutable(Immutable)));
static assert(is(Immutable == const(Immutable)));
static assert(is(Immutable == shared(Immutable)));
static assert(is(Const == const(Const)));
static assert(is(Const == shared(Const)));
static assert(is(Shared == shared(Shared)));
Do people agree?
Also, what exactly is the difference between declaring a struct as immutable or as const? Aren't they unmodifiable either way?