https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101664
Bug ID: 101664
Summary: d: Return the correct value for C++ constructor calls
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: ibuclaw at gdcproject dot org
Target Milestone: ---
C++ constructors return void, even though the front-end semantic treats them as
implicitly returning `this'.
---
extern(C++) struct S
{
int i;
this(int);
}
assert(S(1).i == 1);
---
struct S
{
int i;
S(int n);
};
S::S(int n) : i(n) {}