Bug 11958 – when casting a string to it's representation dmd deduces a wrong inout return type

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-21T09:15:00Z
Last change time
2014-01-21T19:11:37Z
Keywords
CTFE, rejects-valid
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2014-01-21T09:15:27Z
cat > bug.d << CODE inout(ubyte)[] rep(inout(char)[] str) { return cast(inout(ubyte)[])str; } auto foo = rep("foo"c); CODE dmd -c bug ---- rep.d(2): Error: cannot implicitly convert expression ("foo"c) of type inout(ubyte)[] to immutable(ubyte)[] ----
Comment #1 by k.hara.pg — 2014-01-21T17:40:48Z
Already fixed in git-head (2.065a) *** This issue has been marked as a duplicate of issue 11534 ***
Comment #2 by code — 2014-01-21T18:31:58Z
(In reply to comment #1) > Already fixed in git-head (2.065a) > > *** This issue has been marked as a duplicate of issue 11534 *** Sorry for the noise, I used the wrong dmd binary :).
Comment #3 by k.hara.pg — 2014-01-21T19:11:37Z
(In reply to comment #2) > (In reply to comment #1) > > Already fixed in git-head (2.065a) > > > > *** This issue has been marked as a duplicate of issue 11534 *** > > Sorry for the noise, I used the wrong dmd binary :). Don't worry.