newCTFE Status June 2020
kinke
kinke at gmx.net
Mon Jun 8 15:43:02 UTC 2020
On Monday, 8 June 2020 at 15:30:26 UTC, Stefan Koch wrote:
> This is because dmd is a little funky and does not generate a
> default construction-function for you.
> Rather it leaves you to build your own.
> (As far as I can see anyways.)
>
> Which I then documented on a new wiki page were all of my more
> surprising discoveries about dmd will land.
>
> [from the Wiki page]
>
> Will be represented as a `NewExp`
> To get the function that is being called you need to look at
> the member `member` If that `FuncDeclaration` is null, this is
> a call to the default constructor.
Allocation and pre-initialization of classes is handled by
_d_newclass in druntime. If NewExp.member is null, it means that
the class has no default ctor, so no ctor call is needed.
More information about the Digitalmars-d
mailing list