www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11958] New: when casting a string to it's representation dmd deduces a wrong inout return type

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11958

           Summary: when casting a string to it's representation dmd
                    deduces a wrong inout return type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu


--- Comment #0 from Martin Nowak <code dawg.eu> 2014-01-21 09:15:27 PST ---
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)[]
----

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 21 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11958


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, rejects-valid
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-01-21 17:40:48 PST ---
Already fixed in git-head (2.065a)

*** This issue has been marked as a duplicate of issue 11534 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 21 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11958



--- Comment #2 from Martin Nowak <code dawg.eu> 2014-01-21 18:31:58 PST ---
(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 :). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 21 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11958



--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2014-01-21 19:11:37 PST ---
(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. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 21 2014