typed: prevent TYPED: definitions without types.

db4
John Benediktsson 2013-03-20 11:09:34 -07:00
parent 972281987c
commit 3fb1cb6d2d
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ IN: typed
ERROR: type-mismatch-error value expected-type word expected-types ;
ERROR: input-mismatch-error < type-mismatch-error ;
ERROR: output-mismatch-error < type-mismatch-error ;
ERROR: no-types-specified word effect ;
PREDICATE: typed-gensym < word "typed-gensym" word-prop >boolean ;
PREDICATE: typed-word < word "typed-word" word-prop >boolean ;
@ -142,7 +143,7 @@ MACRO: typed ( quot word effect -- quot' )
dup {
[ effect-in-types typed-stack-effect? ]
[ effect-out-types typed-stack-effect? ]
} 1|| [ (typed-def) ] [ drop nip ] if ;
} 1|| [ (typed-def) ] [ nip no-types-specified ] if ;
M: typed-word subwords
[ call-next-method ]