"Timon Gehr" <timon.g...@gmx.ch> wrote in message news:iukvrl$1c1c$1...@digitalmars.com... > > Sure, if you remember the Foo/Qux example (Foo is parent, Qux is child, > method > bar(a,b), parent requires a>0 child requires else b>0) > > void main(){ > auto a=new Foo, b=new Qux; > a.bar(1,-1);//ok > b.bar(1,-1);//ok, child works everywhere parent works > //a.bar(-1,1);// not ok > //b.bar(-1,-1)// not ok > b.bar(-1,1);//ok, child works too if b>0 > }
And it finally clicks! Thanks for taking the time to explain it to me. (If only I'd got it sooner, I wouldn't have spent the last two hours implementing my behaviour in the compiler)