alias this with property enforce

Namespace rswhite4 at googlemail.com
Wed Jun 6 11:12:37 PDT 2012


If i have this code:

class Bar {
public:
Foo GetFoo() {
     return this._foo;
}

alias GetFoo this;
}

to allow access to Foo methods from Bar i get the error, that 
"GetFoo" isn't a property if i use -property.
Why?
The solution is to set @property before "Foo GetFoo()" but why 
must GetFoo a property? What if i don't want to declare GetFoo as 
a property? I cannot use it with alias this?


More information about the Digitalmars-d-learn mailing list