[Issue 17970] New: shared struct destructor doesn't compile anymore
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 6 15:33:08 UTC 2017
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: nobody at puremagic.com
Reporter: radu.racariu at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list