Fix GENERIC# with out of bounds dispatch position
parent
5e2b985d9e
commit
fd3a568191
|
@ -274,4 +274,9 @@ M: growable call-next-hooker call-next-method "growable " prepend ;
|
|||
[ ] [ "IN: generic.single.tests MATH: xyz ( a b -- c )" eval( -- ) ] unit-test
|
||||
|
||||
[ f ] [ "xyz" "generic.single.tests" lookup pic-def>> ] unit-test
|
||||
[ f ] [ "xyz" "generic.single.tests" lookup "decision-tree" word-prop ] unit-test
|
||||
[ f ] [ "xyz" "generic.single.tests" lookup "decision-tree" word-prop ] unit-test
|
||||
|
||||
! Corner case
|
||||
[ "IN: generic.single.tests GENERIC# broken-generic# -1 ( a -- b )" eval( -- ) ]
|
||||
[ error>> bad-dispatch-position? ]
|
||||
must-fail-with
|
|
@ -6,9 +6,13 @@ generic.single.private quotations kernel.private
|
|||
assocs arrays layouts make ;
|
||||
IN: generic.standard
|
||||
|
||||
ERROR: bad-dispatch-position # ;
|
||||
|
||||
TUPLE: standard-combination < single-combination # ;
|
||||
|
||||
C: <standard-combination> standard-combination
|
||||
: <standard-combination> ( # -- standard-combination )
|
||||
dup 0 < [ bad-dispatch-position ] when
|
||||
standard-combination boa ;
|
||||
|
||||
PREDICATE: standard-generic < generic
|
||||
"combination" word-prop standard-combination? ;
|
||||
|
|
Loading…
Reference in New Issue