Should it be a compile time error?

Iain Buclaw ibuclaw at ubuntu.com
Wed Jun 19 04:40:01 PDT 2013


On Wednesday, 19 June 2013 at 11:33:43 UTC, deed wrote:
> The following compiles and crashes with DMD 2.063.
> Should this be a compile time error?
>
>
> class A
> {
>     int _var;
>

/* SNIP */

>     int var() @property
>     {
>         return var;
>     }

Isn't the problem in this property function?  (Shouldn't it 
return _var :o)



More information about the Digitalmars-d-learn mailing list