Explicit default constructor for structs

monarch_dodra monarchdodra at gmail.com
Fri Apr 11 09:05:33 PDT 2014


On Friday, 11 April 2014 at 15:54:36 UTC, Jacob Carlborg wrote:
> On 2014-04-11 15:53, monarch_dodra wrote:
>
>> Yeah. It'd say those wouldn't compile anyway, but I guess 
>> something as
>> trivial as:
>> //----
>> class A
>> {...}
>> A a;
>> a.doit;
>> //----
>> Would compile for both languages, but give different results.
>>
>> Fine.
>
> Unless "doit" is non-virtual in both versions.

Why? The D version would just go from "object.Error Access 
Violation" to "AssertError null this".

And in release, you'd still (highly probably) still get the 
Access Violation.


More information about the Digitalmars-d mailing list