On Tuesday, 18 June 2013 at 09:22:05 UTC, bearophile wrote:
third is the one that triggers a crash of my DMD version. I am
keeping my compiler updated, I have compiled it yesterday, and
it crashes after giving the error:
test.d(28): Error: cannot modify const expression s
Now I don't know if it's a problem of just my compiler, or if
it's a normal compiler bug.
Hmm, on my compiler it just fails to compile
test11.d(32): Error: cannot modify const expression s
test11.d(26): Error: template instance
test11.deserializeInto!(const(immutable(char)[])) error
instantiating
which is actually expected because it is referring to this
function:
override void sayHello(in string) {}
and the ParameterTypeTuple there will return a fully const type
because of the "in", so assigning to it won't work without a cast.
I can't reproduce the compiler crash you saw though.