delegate: verify generics on protocol definition. Fixes #260.

db4
John Benediktsson 2011-10-18 16:29:38 -07:00
parent 13b17fb84a
commit faf556f971
1 changed files with 6 additions and 0 deletions

View File

@ -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 ]