Re: Type qualifiers - inout error

2011-06-17 Thread Jonathan M Davis
On 2011-06-16 16:01, Claudiu Verdes wrote: Hi, I'm new to D and trying to follow Alexandrescu's TDPL code examples I came across an error on the code below: class A { inout(int) val() inout { return _val; // error - see below } private int _val; }; The compiler (dmd v2.052)

Re: Type qualifiers - inout error

2011-06-17 Thread Steven Schveighoffer
On Thu, 16 Jun 2011 22:12:49 -0400, bearophile bearophileh...@lycos.com wrote: Claudiu Verdes: What am I doing wrong? TDPL has a very similar example... I think this TDPL example is not good. And generally inout is not fully implemented in D yet. Yes, a better example would be:

Type qualifiers - inout error

2011-06-16 Thread Claudiu Verdes
Hi, I'm new to D and trying to follow Alexandrescu's TDPL code examples I came across an error on the code below: class A { inout(int) val() inout { return _val; // error - see below } private int _val; }; The compiler (dmd v2.052) complains on the marked line with the message Error: inout on

Re: Type qualifiers - inout error

2011-06-16 Thread bearophile
Claudiu Verdes: What am I doing wrong? TDPL has a very similar example... I think this TDPL example is not good. And generally inout is not fully implemented in D yet. P.S. Is there a netiquette (a la C++ FAQ lite) about posting on this forum that I should be aware of? I think there isn't