auto s = "string"; // s is type char[6] Unless I'm misreading the spec, the type of s should be invariant(char)[6].
Uh, what compiler version are you using? If you're using a D1 compiler, then it should be char[6].
(In reply to comment #1) > Uh, what compiler version are you using? If you're using a D1 compiler, then > it should be char[6]. Sorry, I'm referring to D2. Also, this is an issue with the spec web page, so the language version is in the URL and unambiguous :-)
Both the D1 and D2 specs are on Digital Mars' site, so no, it's not unambiguous.
(In reply to comment #3) > Both the D1 and D2 specs are on Digital Mars' site, so no, it's not > unambiguous. > The URL includes 2.0 in the path. But I'll try to remember to set the version next time, sorry.
shall we close the issue?
Why? string literals should be invariant in D2, so if that's not what's happening, then there's really a bug here. Is this report strictly a documentation bug or was there also code associated to demonstrate the problem? I'm assuming it's strictly a doc issue at the moment.
Fixed in svn revision 906, pending next release.
Fixed 10 months ago (probably in DMD 2.025). It's unlisted in the changelog.