[Issue 2159] Confusion between function call and C++ style function address

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 16 12:12:16 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=2159

anonymous4 <dfj1esp02 at sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec
             Status|RESOLVED                    |REOPENED
           Hardware|x86                         |All
         Resolution|WORKSFORME                  |---
                 OS|Windows                     |All

--- Comment #9 from anonymous4 <dfj1esp02 at sneakemail.com> ---
> Now it doesn't fail
Then it's a subtle bug that can ship to the user.

> and I fail to see how we fix the general since optional
> parens became a thing after UFCS was finally fully implemented.
The compiler can detect overload ambiguity between constructors taking int and
function pointer.

> This might be okay for no-argument methods
FWIW, C# takes method delegates without ampersand syntax much like C does for
functions.

--


More information about the Digitalmars-d-bugs mailing list