https://issues.dlang.org/show_bug.cgi?id=17970
Issue ID: 17970
Summary: shared struct destructor doesn't compile anymore
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The following:
+++++foo.d++++++
shared struct Shared
{
static shared(Shared) make()
{
return shared(Shared)();
}
~this()
{
}
}
void main()
{
auto s = Shared.make();
}
+++++++++++
Compiles with 2.072 and 2.074, fails with upward versions including 2.077 with
this error:
Error: shared method foo.Shared.~this is not callable using a non-shared object
--