[Issue 18310] __traits(isDisabled) returns true for non-function struct member annotated with @disable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 26 14:25:30 UTC 2018


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
Well, the spec is very clear on this one. If the symbol is a function and is
marked with @disable then traits(isDisabled) will return true, otherwise it
will return false. So either if the symbol is not a function declaration or if
it's  not marked @disable, traits(isDisabled) returns false. I don't see any
problems here, since marking @disabled a non-function is a no-op, so it makes
sense to return false in that case.

Closing as invalid.

--


More information about the Digitalmars-d-bugs mailing list