www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12203] New: typeof(null) does not convert to "void delegate(float)"

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

           Summary: typeof(null) does not convert to "void
                    delegate(float)"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code benjamin-thaut.de



PST ---
typeof(null) does not convert to "void delegate(float)". Both the implict as
well as the explicit case do not work. Repro case:

alias void delegate(float) func;
func[] g_data;

void set(U)(auto ref U v)
{
    g_data[0] = v;
    // g_data[0] = null; // works
}

void main(string[] args)
{
    set(null);
}

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




PST ---
The error message is: Error: e2ir: cannot cast v of type typeof(null) to type
void delegate(float)

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull



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

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




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

https://github.com/D-Programming-Language/dmd/commit/1c50c4f268fa719434bb20ac885d7bfb12a019d3
fix Issue 12203 - typeof(null) does not convert to "void delegate(float)"

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


Issue 12203 - typeof(null) does not convert to "void delegate(float)"

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


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

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 20 2014