← Back to index
|
Original Bugzilla link
Bug 7109 – [CTFE] Error with slicing ref string
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-12-14T05:15:00Z
Last change time
2011-12-14T23:04:33Z
Keywords
wrong-code
Assigned to
nobody
Creator
youxkei
Comments
Comment #0
by youxkei — 2011-12-14T05:15:34Z
struct Struct{ string str; } void bar(ref string str){ str = str[0..0]; } static assert({ auto s = Struct("foo"); bar(s.str); return true; }()); This code does't work.
Comment #1
by clugdbug — 2011-12-14T07:38:42Z
Related to bug 6934. It's fixed in this two-week old pull request:
https://github.com/D-Programming-Language/dmd/pull/522
Comment #2
by clugdbug — 2011-12-14T23:04:33Z
*** This issue has been marked as a duplicate of issue 6934 ***