Issue 23036 - Rvalue constructor with default parameter crashes compiler in the presence of a copy constructor
Summary: Rvalue constructor with default parameter crashes compiler in the presence of...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-04-19 05:21 UTC by RazvanN
Modified: 2024-11-28 08:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description RazvanN 2022-04-19 05:21:08 UTC

    
Comment 1 RazvanN 2022-04-19 05:21:26 UTC
struct S
{
    this(ref S) {}
    this(S, int a = 2) {}                                                      
}

void main()
{
    S a;
    S b = a;
}
Comment 2 RazvanN 2022-04-19 05:25:51 UTC
Regression since 2.086.1
Comment 3 Dlang Bot 2022-04-19 05:40:49 UTC
@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
Comment 4 Dlang Bot 2022-04-19 09:27:26 UTC
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