Comment #0 by timothee.cour2 — 2018-01-12T02:34:45Z
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
Comment #1 by ag0aep6g — 2018-01-12T02:46:03Z
`this(this a){}` is not a postblit function. DMD apparently interprets it as a constructor, same as `this(typeof(this) a) {}`. I don't think that's correct, though. It should be rejected as invalid code. Tagging accordingly.
Comment #2 by timothee.cour2 — 2018-01-12T02:48:20Z
agreed, `this(typeof(this) a) {}` should be the correct syntax
Comment #3 by razvan.nitu1305 — 2018-04-05T12:39:20Z