[Issue 3720] Taking address of member functions possible without an instance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 4 01:29:43 UTC 2018


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #16 from Walter Bright <bugzilla at digitalmars.com> ---
If `@safe` is added, the example fails to compile with:

test.d(9): Error: `this` reference necessary to take address of member `fun` in
`@safe` function `main`

which is expected behavior.

--


More information about the Digitalmars-d-bugs mailing list