digitalmars.D.bugs - [Issue 3464] New: is( void function() == function) is false
- d-bugmail puremagic.com (18/18) Nov 01 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3464
- d-bugmail puremagic.com (14/14) Nov 02 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3464
- d-bugmail puremagic.com (7/7) Nov 09 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3464
- d-bugmail puremagic.com (10/10) Nov 09 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3464
- d-bugmail puremagic.com (12/12) Aug 15 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3464
http://d.puremagic.com/issues/show_bug.cgi?id=3464
Summary: is( void function() == function) is false
Product: D
Version: 2.035
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: dsimcha yahoo.com
pragma(msg, is( void delegate() == delegate).stringof); // true
pragma(msg, is( void function() == function).stringof); // false
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3464
Lars T. Kyllingstad <bugzilla kyllingen.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla kyllingen.net
00:00:05 PST ---
This is apparently intentional. I recently brought up the same issue on the NG:
http://www.digitalmars.com/d/archives/digitalmars/D/The_bizarre_world_of_typeof_99461.html#N99486
Quoting Don:
"real function()" is a *function pointer*, but is(xxx == function) tests to see
if xxx is a *function*, not a *function pointer*.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 02 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3464 So what is the proper way to test if something is a function pointer then? It seems horribly inconsistent with delegates. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 09 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3464
Max Samukha <samukha voliacable.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |samukha voliacable.com
PST ---
One way to test: is(typeof(*T.init) == function)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 09 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3464
David Simcha <dsimcha yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
I'll mark this invalid, since the language lawyers (IANALL) say it is, and the
better solution now that it exists is std.traits.isFunctionPointer.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 15 2010









d-bugmail puremagic.com 