[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #5 from Don clugd...@yahoo.com.au 2013-09-04 01:24:33 PDT --- You seem to be expecting the .dup to act as a macro, and be automatically applied to any code that uses the enum? But it doesn't work like that. The expression is

[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #6 from monarchdo...@gmail.com 2013-09-04 02:00:40 PDT --- (In reply to comment #5) You seem to be expecting the .dup to act as a macro, and be automatically applied to any code that uses the enum? No, not at all. I expect that

[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #7 from Don clugd...@yahoo.com.au 2013-09-04 04:53:51 PDT --- My thinking on this is still not completely clear. If you have an enum, by definition it does not have an address - it's a manifest constant. If you are using it in an

[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #4 from monarchdo...@gmail.com 2013-09-03 06:18:53 PDT --- (In reply to comment #2) I think the root issue is that when the enum is first instantiated, the compiler doesn't care what the marked type of the enum is, but rather,

[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #1 from monarchdo...@gmail.com 2013-09-02 11:51:17 PDT --- (In reply to comment #0) Or, the contrary: // import std.exception; enum string s = assumeUnique(['a', 'b']); void main() { auto s1 = s; auto s2 = s; assert

[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #2 from monarchdo...@gmail.com 2013-09-02 11:57:56 PDT --- I think the root issue is that when the enum is first instantiated, the compiler doesn't care what the marked type of the enum is, but rather, what the actual (ctfe) memory

[Issue 10950] [CTFE] enum char[] not correctly duplicated when used.

2013-09-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10950 --- Comment #3 from monarchdo...@gmail.com 2013-09-02 12:04:55 PDT --- (In reply to comment #0) This behavior was seen on DMD.2.063.2 on windows. I'll test linux later. As I thought: // enum char[] s = hello.dup; void main() {