digitalmars.D.bugs - [Issue 5421] New: Ref function pointers can only be made with auto
- d-bugmail puremagic.com (19/19) Jan 07 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5421
- d-bugmail puremagic.com (26/26) Jan 07 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5421
- d-bugmail puremagic.com (12/12) Jun 06 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5421
http://d.puremagic.com/issues/show_bug.cgi?id=5421
Summary: Ref function pointers can only be made with auto
Product: D
Version: D2
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: eatingstaples gmail.com
Creating a function pointer to a ref function can only be done using auto, but
by no explicit means. Also, aliasing a ref function pointer to another type
can't be done.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 07 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5421
Steven Schveighoffer <schveiguy yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy yahoo.com
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: -------
Jan 07 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5421
yebblies <yebblies gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |yebblies gmail.com
Resolution| |DUPLICATE
*** This issue has been marked as a duplicate of issue 2753 ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 06 2011









d-bugmail puremagic.com 