[Issue 11012] [TDPL] is(typeof(f) == function) fails with some functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 11 13:22:39 PDT 2013


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


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru


--- Comment #1 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-09-11 13:22:37 PDT ---
f is not a function but a function pointer, so the issue is against current
design and description of the issue is also misleading by the way.

By the way, this is a good opportunity to raise the question about what 'is'
expression should return. There are currently two kinds 'function' and
'delegate' for three cases - a function, function pointer and delegate.
Currently 'function' maps to function, not to a pointer and 'delegate' maps to
delegate which is inconsistent (there is also inconsistency with not mapping
'function' to function pointer as this keyword is related to function pointers
in other use cases). 

If 'function' should map to both pointer and a function, then there should be
some means to distingiush between them. Another option is to map 'function' to
pointer and function should map to returned type .

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


More information about the Digitalmars-d-bugs mailing list