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