Auto-Implemented properties
Ali Çehreli
acehreli at yahoo.com
Sat Jan 5 16:32:12 PST 2013
On 01/05/2013 03:25 PM, michaelc37 wrote:
> On Saturday, 5 January 2013 at 22:53:44 UTC, Philippe Sigaud wrote:
>> Hi Michael,
>>
>> your code works for me (DMD 2.061, Linux), with a semicolon after the
>> alias
>> in class Bar.
>>
>> Also, use writeln, not writefln, because writefln assumes the first
>> parameter is the formatting string.
>
> Thanks for the tip.
> Does it work for you if you rename the template to
> "AutoImplementedProperty"?
I confirm this: Any name other than the seemingly magical autoproperty
causes the following errors:
Error: a.title is not an lvalue
Error: expression has no value
Ali
More information about the Digitalmars-d-learn
mailing list