struct S { this(ref S) {} this(S, int a = 2) {} } void main() { S a; S b = a; }
Regression since 2.086.1
@RazvanN7 created dlang/dmd pull request #14011 "Fix Issue 23036 - [REG2.086]Rvalue constructor with default parameter…" fixing this issue: - Fix Issue 23036 - [REG2.086]Rvalue constructor with default parameter crashes compiler in the presence of a copy constructor https://github.com/dlang/dmd/pull/14011
dlang/dmd pull request #14011 "Fix Issue 23036 - [REG2.086]Rvalue constructor with default parameter…" was merged into master: - 2d9bb00a46284e27042fa30b1e0a82ce16a20fd0 by RazvanN7: Fix Issue 23036 - [REG2.086]Rvalue constructor with default parameter crashes compiler in the presence of a copy constructor https://github.com/dlang/dmd/pull/14011