digitalmars.D.bugs - [Issue 18628] New: disable this(this) erroneously adds `__postblit`
- d-bugmail puremagic.com (28/28) Mar 18 2018 https://issues.dlang.org/show_bug.cgi?id=18628
https://issues.dlang.org/show_bug.cgi?id=18628 Issue ID: 18628 Summary: disable this(this) erroneously adds `__postblit` member Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: johanengelen weka.io Testcase: ``` import std.traits; import std.stdio; void main() { static struct S { disable this(this); } writeln(hasMember!(S, "__postblit")); // expected: false writeln(hasElaborateCopyConstructor!S); // expected: false } ``` The program prints twice "true", instead of "false". Note that `hasElaborateCopyConstructor` does a `hasMember!(S, "__postblit")` check, so that's the root cause of the problem. --
Mar 18 2018