delegate: verify generics on protocol definition. Fixes #260.
parent
13b17fb84a
commit
faf556f971
|
|
@ -155,9 +155,15 @@ M: consultation forget*
|
|||
: show-words ( wordlist' -- wordlist )
|
||||
[ dup second zero? [ first ] when ] map ;
|
||||
|
||||
ERROR: not-a-generic word ;
|
||||
|
||||
: check-generic ( generic -- )
|
||||
dup generic? [ drop ] [ not-a-generic ] if ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
: define-protocol ( protocol wordlist -- )
|
||||
dup [ check-generic ] each
|
||||
[ drop define-symbol ] [
|
||||
fill-in-depth
|
||||
[ forget-old-definitions ]
|
||||
|
|
|
|||
Loading…
Reference in New Issue