[Issue 18628] New: @disable this(this) erroneously adds `__postblit` member
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 18 20:31:02 UTC 2018
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 at puremagic.com
Reporter: johanengelen at 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.
--
More information about the Digitalmars-d-bugs
mailing list