[Issue 18628] @disable this(this) erroneously adds `__postblit` member
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 20 23:36:10 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18628
--- Comment #6 from johanengelen at weka.io ---
(In reply to johanengelen from comment #5)
>
> Currently, adding `@disable this(this)` to a struct that normally wouldn't
> have a postblit, actually makes the compiler emit a postblit function
Interestingly without @disable, no postblit is emitted when just a declaration
is given:
```
struct S {
int i;
@disable this(this); // will emit S.__aggrPostblit() function
}
```
without @disable:
```
struct S {
int i;
this(this); // will _not_ emit S.__aggrPostblit() function
}
```
--
More information about the Digitalmars-d-bugs
mailing list