[Issue 11303] IsExpression can not return the correct result about function & delegate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 20 01:18:04 PDT 2013


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


Max Samukha <samukha at voliacable.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |samukha at voliacable.com
         Resolution|                            |INVALID


--- Comment #1 from Max Samukha <samukha at voliacable.com> 2013-10-20 01:18:01 PDT ---
is(T == function) tests for function object type, not function pointer type.
Many consider that an inconsistency, but that's the state of things. Your tests
should be:

   static assert(is(typeof(*fn1) == function));
   static assert(is(typeof(*fn2) == function));
   static assert(is(typeof(*fn3) == function));
   static assert(is(typeof(*fn4) == function));
   static assert(is(typeof(*fn5) == function));
   static assert(is(typeof(*fn6) == function));

-- 
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