[Issue 15994] Trivial code compiled with dmd ends with code 11 !?

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu May 5 07:15:20 PDT 2016


Dicebot <public at dicebot.lv> changed:

           What    |Removed                     |Added
                 CC|                            |public at dicebot.lv

--- Comment #1 from Dicebot <public at dicebot.lv> ---
Classes in D are reference types. By `B b` you define a null reference of B
class and trying to call a method of it crashes program.

You need to do `b = new B` somewhere.


More information about the Digitalmars-d-bugs mailing list