From 790001cd58ad64b124cd9e553a904d8ea9590a8d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 5 Mar 2009 13:43:33 -0600 Subject: [PATCH] Add test case for erg's locals bug --- basis/locals/errors/errors.factor | 2 +- basis/locals/locals-tests.factor | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/basis/locals/errors/errors.factor b/basis/locals/errors/errors.factor index 95c8357939..d11405ddb5 100644 --- a/basis/locals/errors/errors.factor +++ b/basis/locals/errors/errors.factor @@ -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." ; diff --git a/basis/locals/locals-tests.factor b/basis/locals/locals-tests.factor index bd9e7cf103..08c667447c 100644 --- a/basis/locals/locals-tests.factor +++ b/basis/locals/locals-tests.factor @@ -500,4 +500,11 @@ 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 \ No newline at end of file +[ 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 \ No newline at end of file