USING: accessors classes generic kernel sequences tools.test ;
IN: test
MIXIN: power1
MIXIN: power2
TUPLE: dad ;
TUPLE: bro1 < dad ;
TUPLE: bro2 < dad ;
INSTANCE: dad power1
INSTANCE: bro2 power2
GENERIC: content ( tpl -- str )
M: power1 content ( tpl -- str ) class name>> " power1" append ;
M: power2 content ( tpl -- str ) class name>> " power2" append ;
{ "bro2 power2" } [ bro2 new content ] unit-test
I haven't figured out how to debug/step into inheritance chains/method order
choosing.
--
Jim
"I'm for extending the working Medicare program for our seniors all the way
back to contraception, so Americans can concentrate on living their lives
without fear of changing a job, going bankrupt from deductibles or fighting
HMO bureaucracy."
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk