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

Let's take the following code:

shared struct S
    int i;


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.


Reply via email to