[Issue 18228] New: this(this a){} doesn't generate postblit ctor; this(this){} does
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 12 02:34:45 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18228
Issue ID: 18228
Summary: this(this a){} doesn't generate postblit ctor;
this(this){} does
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: timothee.cour2 at gmail.com
in all of D, parameter names are optional (if unused) eg: `fun(int a)` <=>
`fun(int)` but not for postblit:
```
struct C{
version(v1)
this(this a){}
version(v2)
this(this){ }
}
pragma(msg, "C: " ~ __traits(allMembers, C).stringof);
```
dmd -o- -version=v1 main.d
C: tuple("__ctor")
dmd -o- -version=v2 main.d
C: tuple("__postblit", "__xpostblit", "opAssign")
DMD64 D Compiler v2.077.1
--
More information about the Digitalmars-d-bugs
mailing list