2008-11-05 19:32:02 -05:00
|
|
|
USING: kernel tools.test eval ;
|
|
|
|
IN: compiler.tests.redefine12
|
|
|
|
|
|
|
|
! A regression that came about when fixing the
|
|
|
|
! 'no method on classes-intersect?' bug
|
|
|
|
|
|
|
|
GENERIC: g ( a -- b )
|
|
|
|
|
|
|
|
M: object g drop t ;
|
|
|
|
|
|
|
|
: h ( a -- b ) dup [ g ] when ;
|
|
|
|
|
|
|
|
[ f ] [ f h ] unit-test
|
|
|
|
[ t ] [ "hi" h ] unit-test
|
|
|
|
|
|
|
|
TUPLE: jeah ;
|
|
|
|
|
2009-04-17 16:49:21 -04:00
|
|
|
[ ] [ "USE: kernel IN: compiler.tests.redefine12 M: jeah g drop f ;" eval( -- ) ] unit-test
|
2008-11-05 19:32:02 -05:00
|
|
|
|
|
|
|
[ f ] [ T{ jeah } h ] unit-test
|