Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/dmd/func.d
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,8 @@ extern (C++) FuncDeclaration resolveFuncCall(const ref Loc loc, Scope* sc, Dsymb
{
assert(fd);

if (fd.checkDisabled(loc, sc))
// remove when deprecation period of class allocators and deallocators is over
if (fd.isNewDeclaration() && fd.checkDisabled(loc, sc))
return null;

bool hasOverloads = fd.overnext !is null;
Expand Down
21 changes: 21 additions & 0 deletions test/fail_compilation/fail19419.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail19419.d(20): Error: none of the overloads of `this` are callable using argument types `(int)`, candidates are:
fail_compilation/fail19419.d(12): `fail19419.B.this()`
fail_compilation/fail19419.d(14): `fail19419.B.this(string s)`
---
*/

struct B
{
@disable this();

this(string s)
{}
}

void main()
{
auto b = B(3);
}