words: Rename undefined.
parent
ee4f4ec997
commit
342b8e5cab
|
@ -66,10 +66,10 @@ FORGET: another-forgotten
|
||||||
|
|
||||||
! Make sure that undefined words throw proper errors
|
! Make sure that undefined words throw proper errors
|
||||||
DEFER: deferred
|
DEFER: deferred
|
||||||
[ deferred ] [ T{ undefined f deferred } = ] must-fail-with
|
[ deferred ] [ T{ undefined-word f deferred } = ] must-fail-with
|
||||||
|
|
||||||
[ "IN: words.tests DEFER: not-compiled << not-compiled >>" eval( -- ) ]
|
[ "IN: words.tests DEFER: not-compiled << not-compiled >>" eval( -- ) ]
|
||||||
[ error>> [ undefined? ] [ word>> name>> "not-compiled" = ] bi and ] must-fail-with
|
[ error>> [ undefined-word? ] [ word>> name>> "not-compiled" = ] bi and ] must-fail-with
|
||||||
|
|
||||||
[ ] [ "IN: words.tests FORGET: not-compiled" eval( -- ) ] unit-test
|
[ ] [ "IN: words.tests FORGET: not-compiled" eval( -- ) ] unit-test
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ DEFER: deferred
|
||||||
] when*
|
] when*
|
||||||
|
|
||||||
[ "IN: words.tests : undef-test ( -- ) ; << undef-test >>" eval( -- ) ]
|
[ "IN: words.tests : undef-test ( -- ) ; << undef-test >>" eval( -- ) ]
|
||||||
[ error>> undefined? ] must-fail-with
|
[ error>> undefined-word? ] must-fail-with
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
"IN: words.tests GENERIC: symbol-generic ( -- )" eval( -- )
|
"IN: words.tests GENERIC: symbol-generic ( -- )" eval( -- )
|
||||||
|
|
|
@ -53,8 +53,8 @@ M: word definition def>> ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
TUPLE: undefined word ;
|
TUPLE: undefined-word word ;
|
||||||
: undefined ( -- * ) callstack caller \ undefined boa throw ;
|
: undefined ( -- * ) callstack caller \ undefined-word boa throw ;
|
||||||
|
|
||||||
: undefined-def ( -- quot )
|
: undefined-def ( -- quot )
|
||||||
#! 'f' inhibits tail call optimization in non-optimizing
|
#! 'f' inhibits tail call optimization in non-optimizing
|
||||||
|
|
Loading…
Reference in New Issue