www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11661] New: Meaningless error: "a struct is not a valid initializer for a void function()"

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

           Summary: Meaningless error: "a struct is not a valid
                    initializer for a void function()"
           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


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2013-12-01 18:09:48 PST ---
This code should work, but doesn't.

void main()
{
    void delegate() dg = {};  // OK
    void function() fp = {};  // NG
}

test.d(4): Error: a struct is not a valid initializer for a void function()

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11661


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

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


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-12-01 18:12:50 PST ---
https://github.com/D-Programming-Language/dmd/pull/2909

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11661



--- Comment #2 from github-bugzilla puremagic.com 2013-12-02 09:56:48 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ad2ca4bf5f46d36e7eab1784572c67ed24d7cec7
fix Issue 11661 - Meaningless error: "a struct is not a valid initializer for a
void function()"

https://github.com/D-Programming-Language/dmd/commit/12f40d54329c41797316d8bcbfcb92750498e233
Merge pull request #2909 from 9rnsr/fix11661

Issue 11661 - Meaningless error: "a struct is not a valid initializer for a
void function()"

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 02 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11661


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: -------
Dec 02 2013