Fix tuple class redefinition not updating constructor
parent
cece726e54
commit
1a43d30d54
|
@ -61,6 +61,11 @@ M: pair (bitfield-quot) ( spec -- quot )
|
|||
|
||||
\ set-slots [ <reversed> [get-slots] ] 1 define-transform
|
||||
|
||||
\ construct-boa [
|
||||
dup tuple-size [ <tuple-boa> ] 2curry
|
||||
] 1 define-transform
|
||||
: [construct] ( word quot -- newquot )
|
||||
>r dup +inlined+ depends-on dup tuple-size r> 2curry ;
|
||||
|
||||
\ construct-boa
|
||||
[ [ <tuple-boa> ] [construct] ] 1 define-transform
|
||||
|
||||
\ construct-empty
|
||||
[ [ <tuple> ] [construct] ] 1 define-transform
|
||||
|
|
|
@ -59,7 +59,7 @@ M: tuple class class-of-tuple ;
|
|||
] unless
|
||||
] when 2drop ;
|
||||
|
||||
GENERIC: tuple-size ( class -- size ) foldable
|
||||
GENERIC: tuple-size ( class -- size )
|
||||
|
||||
M: tuple-class tuple-size "slot-names" word-prop length 2 + ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue