question about multiple alias this

2015-09-24 Thread steven kladitis via Digitalmars-d-learn
class A{ int i; bool b; alias i this; alias b this; } void main() { auto a = new A; int i = a; bool b = a; } --- this will not compile in dmd 2068.1. --- ok, but what technique do you use to emulate this type of behavior?? --- would interfaces be the answer, if so could I see an

Re: question about multiple alias this

2015-09-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 24, 2015 13:04:20 steven kladitis via Digitalmars-d-learn wrote: > class A{ >int i; >bool b; >alias i this; >alias b this; > } > > void main() > { >auto a = new A; >int i = a; >bool b = a; > } > > --- this will not compile in dmd 2068.1. > ---