]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix dispatch bug found by mnestic
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 10 Sep 2008 06:45:16 +0000 (01:45 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 10 Sep 2008 06:45:16 +0000 (01:45 -0500)
core/kernel/kernel-tests.factor
core/sequences/sequences.factor

index 5cb4abc2e9e555905126cb2cc18ca84e5b9626fc..8a51d45447a2e88307b4140e08a9a331670f4d0b 100755 (executable)
@@ -1,6 +1,7 @@
 USING: arrays byte-arrays kernel kernel.private math memory
 namespaces sequences tools.test math.private quotations
-continuations prettyprint io.streams.string debugger assocs ;
+continuations prettyprint io.streams.string debugger assocs
+sequences.private ;
 IN: kernel.tests
 
 [ 0 ] [ f size ] unit-test
@@ -118,7 +119,8 @@ IN: kernel.tests
 
 [ total-failure-1 ] must-fail
 
-! From combinators.lib
 [ 1 1 2 2 3 3 ] [ 1 2 3 [ dup ] tri@ ] unit-test
 [ 1 4 9 ] [ 1 2 3 [ sq ] tri@ ] unit-test
 [ [ sq ] tri@ ] must-infer
+
+[ 4 ] [ 1 { [ 1 ] [ 2 ] } dispatch sq ] unit-test
index df79069898741e991d74eaf6a2083e002cb488d5..dbb24c316818c8b2c7114c9cc1d50ba7d169aa23 100755 (executable)
@@ -74,7 +74,7 @@ INSTANCE: immutable-sequence sequence
 : set-array-nth ( elt n array -- )
     swap 2 fixnum+fast set-slot ; inline
 
-: dispatch ( n array -- ) array-nth (call) ;
+: dispatch ( n array -- ) array-nth call ;
 
 GENERIC: resize ( n seq -- newseq ) flushable