September 14, 2012 [Issue 8659] New: CTFE: str ~= wchar rejected if string was initialized with an array literal | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8659 Summary: CTFE: str ~= wchar rejected if string was initialized with an array literal Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: clugdbug@yahoo.com.au --- Comment #0 from Don <clugdbug@yahoo.com.au> 2012-09-14 03:39:55 PDT --- This was the second bug reported in bug 8601. It's completely unrelated to the first one. A string initialized with an array literal doesn't support ~= of a character of a larger size. bool bug() { string r = ['x', 'q']; dchar c = 'ü'; r ~= c; assert(r == "xqü"); return true; } static assert(bug()); bug.d(8): Error: Cannot interpret r ~= c at compile time I'm not entirely sure what to do with this. The problem is, after r~=c, is r a string literal or an array literal? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 17, 2012 [Issue 8659] CTFE: str ~= wchar rejected if string was initialized with an array literal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | http://d.puremagic.com/issues/show_bug.cgi?id=8659 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |CTFE, rejects-valid Depends on| |8660 --- Comment #1 from Don <clugdbug@yahoo.com.au> 2012-09-17 01:03:35 PDT --- The spec-related issue of the difference between string literals and array literals is in bug 8660. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation