Add test case for mixin bug Doug found, seems to be fixed now
parent
af41dc6169
commit
d58f73453f
basis/compiler/tests
|
@ -0,0 +1,25 @@
|
|||
USING: kernel tools.test eval words ;
|
||||
IN: compiler.tests.redefine18
|
||||
|
||||
! Mixin bug found by Doug
|
||||
|
||||
GENERIC: g1 ( a -- b )
|
||||
GENERIC: g2 ( a -- b )
|
||||
|
||||
MIXIN: c
|
||||
SINGLETON: a
|
||||
INSTANCE: a c
|
||||
|
||||
M: c g1 g2 ;
|
||||
M: a g2 drop a ;
|
||||
|
||||
MIXIN: d
|
||||
INSTANCE: d c
|
||||
|
||||
M: d g2 drop d ;
|
||||
|
||||
[ ] [ "IN: compiler.tests.redefine18 SINGLETON: b INSTANCE: b d" eval( -- ) ] unit-test
|
||||
|
||||
[ d ] [ "b" "compiler.tests.redefine18" lookup g1 ] unit-test
|
||||
|
||||
[ ] [ "IN: compiler.tests.redefine18 FORGET: b" eval( -- ) ] unit-test
|
Loading…
Reference in New Issue