Add test case for erg's locals bug

db4
Slava Pestov 2009-03-05 13:43:33 -06:00
parent 74573c65f5
commit 790001cd58
2 changed files with 9 additions and 2 deletions

View File

@ -37,4 +37,4 @@ M: bad-lambda-rewrite summary
ERROR: bad-local args obj ;
M: bad-local summary
drop "You have bound a bug in locals. Please report." ;
drop "You have found a bug in locals. Please report." ;

View File

@ -501,3 +501,10 @@ M:: integer lambda-method-forget-test ( a -- b ) ;
[ { \ + 3 } ] [ [let | a [ 3 ] | { \ + a } ] ] unit-test
[ 3 ] [ [let | a [ \ + ] | 1 2 [ \ a execute ] ] call ] unit-test
! erg found this problem
:: erg's-:>-bug ( n ? -- n ) [ n :> n n ] [ n :> b b ] if ;
[ 3 ] [ 3 f erg's-:>-bug ] unit-test
[ 3 ] [ 3 t erg's-:>-bug ] unit-test