Bug 19870 – Generated Copy Constructor disables default construction

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-05-14T12:56:52Z
Last change time
2019-05-14T16:03:08Z
Assigned to
No Owner
Creator
RazvanN

Comments

Comment #0 by razvan.nitu1305 — 2019-05-14T12:56:52Z
struct T { int i; this(ref return scope inout typeof(this) src) inout @safe pure nothrow @nogc { i = src.i; } } struct S { T t; } auto bar(T a) { S b = S(a); // Error } Expected behavior: code compiles succesfulyy
Comment #1 by dlang-bot — 2019-05-14T12:57:47Z
@RazvanN7 updated dlang/dmd pull request #9790 "Fix Copy Constructor Issue" mentioning this issue: - Issue 19870 - Generated Copy Constructor disables default construction https://github.com/dlang/dmd/pull/9790
Comment #2 by dlang-bot — 2019-05-14T16:03:08Z
dlang/dmd pull request #9790 "Fix Issue 19870 - Generated Copy Constructor disables default construction" was merged into master: - eb13f2ccdbec7c7343e5756cb34f46d8b1344b9c by RazvanN7: Fix Issue 19870 - Generated Copy Constructor disables default construction https://github.com/dlang/dmd/pull/9790