From 7e1ba0ce67831f8c25b9bf2d6d9d40aaa80beb79 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 5 Aug 2008 19:31:49 -0500 Subject: [PATCH] New propagation tests --- .../tree/propagation/propagation-tests.factor | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/unfinished/compiler/tree/propagation/propagation-tests.factor b/unfinished/compiler/tree/propagation/propagation-tests.factor index b14e94ab8c..515d1bf474 100644 --- a/unfinished/compiler/tree/propagation/propagation-tests.factor +++ b/unfinished/compiler/tree/propagation/propagation-tests.factor @@ -536,3 +536,15 @@ M: array iterate first t ; [ V{ f } ] [ [ 10 eq? [ drop 3 ] unless ] final-literals ] unit-test + +GENERIC: bad-generic ( a -- b ) +M: fixnum bad-generic 1 fixnum+fast ; +: bad-behavior 4 bad-generic ; inline recursive + +[ V{ fixnum } ] [ [ bad-behavior ] final-classes ] unit-test + +[ V{ number } ] [ + [ + 0 10 [ bad-generic dup 123 bitand drop bad-generic 1 + ] times + ] final-classes +] unit-test