Skip to content

Commit 22d84cf

Browse files
committed
Merge remote-tracking branch 'origin/dmd-rewrite-stable' into merge-2.112
2 parents f2ad34d + 523e9d9 commit 22d84cf

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

dmd/dstruct.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ version (IN_LLVM) {} else
310310
}
311311
if (auto ctorDecl = s.isCtorDeclaration())
312312
{
313-
if (!ctorDecl.isCpCtor && (!ignoreDisabled || !(ctorDecl.storage_class & STC.disable)))
313+
if (!ctorDecl.isCpCtor && !ctorDecl.isMoveCtor && (!ignoreDisabled || !(ctorDecl.storage_class & STC.disable)))
314314
{
315315
result = true;
316316
return 1;

dmd/func.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,8 @@ extern (C++) final class CtorDeclaration : FuncDeclaration
14251425

14261426
override const(char)* kind() const
14271427
{
1428-
return isCpCtor ? "copy constructor" : "constructor";
1428+
return isCpCtor ? "copy constructor" :
1429+
isMoveCtor ? "move constructor" : "constructor";
14291430
}
14301431

14311432
override bool isVirtual() const

tests/dmd/compilable/test21476.d

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// https://github.com/dlang/dmd/issues/21476
2+
3+
struct S21476
4+
{
5+
string field;
6+
this(ref return scope S21476);
7+
this(return scope S21476);
8+
}
9+
10+
void test21476()
11+
{
12+
auto o = S21476("aoe");
13+
}

0 commit comments

Comments
 (0)