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

Simen Kjaeraas <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from Simen Kjaeraas <[email protected]> ---
Try it again with print() being final on the class. The reason your code causes
a runtime error with the class is the method is virtual, and so needs to be
looked up in the vtable. No such lookup is necessary for the struct, and so no
null-deref happens, and so no runtime error.

--

Reply via email to