www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9743] New: IFTI and polymorphic string literal should support implicit conversion to static array type

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

           Summary: IFTI and polymorphic string literal should support
                    implicit conversion to static array type
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com



Sample code:

void main()
{
    void testc()(ref immutable char[4] str) { }
    testc("1234");  // works, OK

    void testw()(ref immutable wchar[4] str) { }
    testw("1234");  // should work, but doesn't
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9743


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/1761

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9743


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code dawg.eu



cat > bug.d << CODE
void foo(ref in wchar[4]) {}
void bar()
{
    foo("abcd");
}
CODE
dmd -c bug

----

This also happens with functions and is not restricted to IFTI.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9743




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1877c84d16a553c8686439506e4b7a9e03476f1f
fix Issue 9743 - IFTI and polymorphic string literal should support implicit
conversion to static array type

Support (non-)polymorphic string argument

https://github.com/D-Programming-Language/dmd/commit/6b634f369a53cdc297d0f41c50d03f8b091ea074


Issue 9743 - IFTI and polymorphic string literal should support implicit
conversion to static array type

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9743


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 27 2013