fix boa undo to work with structs

db4
Joe Groff 2009-08-12 16:09:25 -04:00
parent 0109061474
commit 287207df72
2 changed files with 4 additions and 2 deletions

View File

@ -236,7 +236,7 @@ DEFER: __
"predicate" word-prop [ dupd call assure ] curry ;
: slot-readers ( class -- quot )
all-slots [ name>> reader-word 1quotation ] map [ cleave ] curry ;
class-slots [ name>> reader-word 1quotation ] map [ cleave ] curry ;
: ?wrapped ( object -- wrapped )
dup wrapper? [ wrapped>> ] when ;

View File

@ -1,5 +1,5 @@
USING: accessors alien.c-types classes.c-types classes.struct
combinators kernel tools.test ;
combinators inverse kernel tools.test ;
IN: classes.struct.tests
STRUCT: foo
@ -28,3 +28,5 @@ STRUCT: bar
[ 7654 ] [ S{ foo f 98 7654 f } y>> ] unit-test
[ 7654 ] [ S{ foo { y 7654 } } y>> ] unit-test
[ 98 7654 t ] [ S{ foo f 98 7654 t } [ foo boa ] undo ] unit-test