[Issue 17749] New: Compilation error "shared method ~this is not callable using a non-shared object" on shared object
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Aug 12 11:11:29 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17749
Issue ID: 17749
Summary: Compilation error "shared method ~this is not callable
using a non-shared object" on shared object
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: arychlinski at gmail.com
Let's take the following code:
shared struct S
{
int i;
~this()
{
}
}
void main()
{
shared s = shared S();
}
DMD64 D Compiler v2.075.0 raises the error:
shtest.d(12): Error: shared method shtest.S.~this is not callable using a
non-shared object
ldc 1.3.0 compiles this code without errors.
--
More information about the Digitalmars-d-bugs
mailing list