http://d.puremagic.com/issues/show_bug.cgi?id=5421


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #1 from Steven Schveighoffer <schvei...@yahoo.com> 2011-01-07 
07:05:33 PST ---
Example code showing the issue:

int x;
ref int foo()
{
    return x;
}

void main()
{
    auto func = &foo;
    pragma(msg, typeof(func).stringof); // outputs "int function() ref"
    //int function() ref func; // uncomment for error
    func() = 5;
}

Error when auto is not used:

testreffuncptr.d(9): no identifier for declarator int function()
testreffuncptr.d(9): semicolon expected, not 'ref'
testreffuncptr.d(9): found 'ref' instead of statement

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

Reply via email to