diff --git a/basis/bootstrap/image/primitives/primitives.factor b/basis/bootstrap/image/primitives/primitives.factor index 5ffd047ad6..86d59932fe 100644 --- a/basis/bootstrap/image/primitives/primitives.factor +++ b/basis/bootstrap/image/primitives/primitives.factor @@ -689,7 +689,7 @@ CONSTANT: all-primitives { { { "array>quotation" ( array -- quot ) "array_to_quotation" - { array } { quotation } make-foldable + { array } { quotation } make-flushable } } } diff --git a/core/quotations/quotations-tests.factor b/core/quotations/quotations-tests.factor index 4deb0769bc..ac2e1e97a3 100644 --- a/core/quotations/quotations-tests.factor +++ b/core/quotations/quotations-tests.factor @@ -1,4 +1,5 @@ -USING: kernel math quotations sequences tools.test ; +USING: kernel math quotations.private sequences tools.test ; +IN: quotations { [ 3 ] } [ 3 [ ] curry ] unit-test { [ \ + ] } [ \ + [ ] curry ] unit-test @@ -15,3 +16,13 @@ USING: kernel math quotations sequences tools.test ; { [ "hi" ] } [ "hi" 1quotation ] unit-test [ 1 \ + curry ] must-fail + +: trouble ( -- arr quot ) { 123 } dup array>quotation ; + +{ 999 } [ + ! Call the quotation which compiles it. + trouble call drop + ! Change the array used for it. + 999 0 rot set-nth + trouble nip call +] unit-test