From 9ebd9c8d01d563ff081803de9126b4d69d2e3a2a Mon Sep 17 00:00:00 2001
From: Slava Pestov <slava@slava-pestovs-macbook-pro.local>
Date: Sun, 22 Mar 2009 21:42:15 -0500
Subject: [PATCH] Add unit test for regression

---
 basis/compiler/tests/redefine15.factor | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 basis/compiler/tests/redefine15.factor

diff --git a/basis/compiler/tests/redefine15.factor b/basis/compiler/tests/redefine15.factor
new file mode 100644
index 0000000000..797460a411
--- /dev/null
+++ b/basis/compiler/tests/redefine15.factor
@@ -0,0 +1,20 @@
+USING: compiler.units words tools.test math kernel ;
+IN: compiler.tests.redefine15
+
+DEFER: word-1
+
+: word-2 ( a -- b ) word-1 ;
+
+[ \ word-1 [ ] (( a -- b )) define-declared ] with-compilation-unit 
+
+[ "a" ] [ "a" word-2 ] unit-test
+
+: word-3 ( a -- b ) 1 + ;
+
+: word-4 ( a -- b c ) 0 swap word-3 swap 1+ ;
+
+[ 1 1 ] [ 0 word-4 ] unit-test
+
+[ \ word-3 [ [ 2 + ] bi@ ] (( a b -- c d )) define-declared ] with-compilation-unit
+
+[ 2 3 ] [ 0 word-4 ] unit-test
\ No newline at end of file