[Issue 3464] is( void function() == function) is false
https://issues.dlang.org/show_bug.cgi?id=3464 Andrei Alexandrescu changed: What|Removed |Added Version|2.035 |D2 --
[Issue 3464] is( void function() == function) is false
http://d.puremagic.com/issues/show_bug.cgi?id=3464 David Simcha changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #4 from David Simcha 2010-08-15 21:23:01 PDT --- 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: ---
[Issue 3464] is( void function() == function) is false
http://d.puremagic.com/issues/show_bug.cgi?id=3464 Max Samukha changed: What|Removed |Added CC||samu...@voliacable.com --- Comment #3 from Max Samukha 2009-11-09 07:14:01 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: ---
[Issue 3464] is( void function() == function) is false
http://d.puremagic.com/issues/show_bug.cgi?id=3464 --- Comment #2 from David Simcha 2009-11-09 06:32:47 PST --- 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: ---
[Issue 3464] is( void function() == function) is false
http://d.puremagic.com/issues/show_bug.cgi?id=3464 Lars T. Kyllingstad changed: What|Removed |Added CC||bugzi...@kyllingen.net --- Comment #1 from Lars T. Kyllingstad 2009-11-02 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: ---