make tests pass

db4
Joe Groff 2010-03-04 22:43:01 -08:00
parent 053ba583fc
commit 1b1ccb71a4
3 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ M: invalid-quotation-input summary
M: invalid-quotation-input error.
dup summary print
P [ quots>> ] [ branches>> ] bi quots-and-branches. ;
[ quots>> ] [ branches>> ] bi quots-and-branches. ;
M: invalid-effect-variable summary
drop "Stack effect variables can only occur as the first input or output" ;

View File

@ -49,6 +49,8 @@ IN: stack-checker.row-polymorphism.tests
: poly-infer-must-fail ( quot -- )
'[ _ infer-polymorphic-quot ] [ invalid-quotation-input? ] must-fail-with ; inline
: poly-infer-must-fail-bad-macro-input ( quot -- )
'[ _ infer-polymorphic-quot ] [ bad-macro-input? ] must-fail-with ; inline
H{ { "a" 0 } } [ [ write ] checked-each ] test-poly-infer
H{ { "a" 1 } } [ [ append ] checked-each ] test-poly-infer
@ -90,8 +92,8 @@ H{ { "a" 1 } { "b" 1 } } [ [ dup + ] checked-with-variable ] test-poly-infer
[ [ ] [ 2dup ] checked-if* ] poly-infer-must-fail
[ "derp" checked-each ] poly-infer-must-fail
[ checked-each ] poly-infer-must-fail
[ checked-each ] poly-infer-must-fail-bad-macro-input
[ "derp" [ "derp" ] checked-if ] poly-infer-must-fail
[ [ "derp" ] "derp" checked-if ] poly-infer-must-fail
[ [ "derp" ] checked-if ] poly-infer-must-fail
[ [ "derp" ] checked-if ] poly-infer-must-fail-bad-macro-input

View File

@ -92,7 +92,7 @@ GENERIC: (infer-known) ( known -- effect )
M: object (infer-known)
current-word get bad-macro-input ;
M: literal (infer-known)
value>> dup callable? [ infer ] [ current-word get bad-macro-input ] if ;
value>> dup callable? [ infer ] [ abandon-check ] if ;
M: composed (infer-known)
[ quot1>> known (infer-known) ] [ quot2>> known (infer-known) ] bi compose-effects ;
M: curried (infer-known)
@ -127,5 +127,3 @@ PRIVATE>
] dip current-word set ;
SYMBOL: infer-polymorphic?