digitalmars.D.bugs - [Issue 18310] New: __traits(isDisabled) returns true for
- d-bugmail puremagic.com (29/29) Jan 26 2018 https://issues.dlang.org/show_bug.cgi?id=18310
https://issues.dlang.org/show_bug.cgi?id=18310 Issue ID: 18310 Summary: __traits(isDisabled) returns true for non-function struct member annotated with disable Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: hsteoh quickfur.ath.cx Code: ------- struct S { disable string toString(); } static assert(__traits(isDisabled, S.toString)); // OK struct T { disable float toString; } static assert(__traits(isDisabled, T.toString)); // NG ------- Expected behaviour: either annotating a non-function member with disable should be rejected with a compile error, or __traits(isDisabled) should return true in that case. --
Jan 26 2018