# HG changeset patch # User thomask # Date 1116054351 0 # Node ID a3c3ff62b051f70adad1efbab4cc3772a136fa14 # Parent 5320be2851e8648900648160fd665aaaf300c4d9 mixin / class member / this David Friedman 2005-05-04 news:d595ii$lqr$1@digitaldaemon.com diff -r 5320be2851e8 -r a3c3ff62b051 run/m/mixin_13.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/m/mixin_13.d Sat May 14 07:05:51 2005 +0000 @@ -0,0 +1,38 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman +// @date@ 2005-05-04 +// @uri@ news:d595ii$lqr$1@digitaldaemon.com + +module dstress.run.m.mixin_13; + +int status; + +class C { + template T(alias f) { + void check(){ + f(); + assert(status++==2); + } + } + + void test(){ + assert(status++==1); + } + + void run() { + assert(status++==0); + mixin T!(test) x; + x.check(); + assert(status++==3); + } +} + +int main(){ + C c = new C; + c.run(); + assert(status==4); + return 0; +}