@property - take it behind the woodshed and shoot it?
Johannes Pfau
nospam at example.com
Fri Jan 25 12:31:28 PST 2013
Am Fri, 25 Jan 2013 21:28:34 +0100
schrieb Johannes Pfau <nospam at example.com>:
> Am Fri, 25 Jan 2013 12:12:55 -0800
> schrieb "H. S. Teoh" <hsteoh at quickfur.ath.cx>:
>
> >
> >
> > > struct Type
> > > {
> > > @property void native(int);
> > > }
> >
> > This should behave as though you wrote this:
> >
> > struct Type
> > {
> > // const because there is no setter
> > const int native;
> > }
>
> Only if the getter is marked as const. We can discuss if that should
> be required, but in the code above, native isn't necessarily const.
Ah you fooled me! There is only a setter in the first example!
More information about the Digitalmars-d
mailing list