www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22288] New: forward reference error for protected destructor


          Issue ID: 22288
           Summary: forward reference error for protected destructor with
                    extern(C++) under Windows
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: tim.dlang t-online.de

The following code does not compile under Windows with dmd v2.097.2:

extern(C++) class C

Compiling it under Windows results in the following error:
test.d(1): Error: class `test.C` base class is forward referenced by `C`

It compiles sucessfully under Linux. It also compiles under Windows without

Maybe protected destructors are not supported. In that case the error message
could be improved.

Sep 07 2021