[Issue 14837] New: Class constructor is not called under *certain* conditions

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 27 07:21:14 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14837

          Issue ID: 14837
           Summary: Class constructor is not called under *certain*
                    conditions
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: czdanol at gmail.com

Hey, this is quite a big problem here (maybe not for you, but it is for me).

I have this code:
http://pastebin.com/h5Zaz00m

Expected output is:
-------------------
main called
moduleInit called
P constructor
C constructor
TEST
10
-------------------

But we get:
-------------------
main called
moduleInit called
TEST
0
-------------------

That means that neither C's or P's constructor is called, for unknown reasons.
>From further tests I found out that the memory is allocated.

Tested on 2.067 and 2.065

--


More information about the Digitalmars-d-bugs mailing list