diff --git a/core/classes/tuple/tuple-tests.factor b/core/classes/tuple/tuple-tests.factor index ea1deadf94..c702cc03a6 100644 --- a/core/classes/tuple/tuple-tests.factor +++ b/core/classes/tuple/tuple-tests.factor @@ -701,6 +701,16 @@ TUPLE: boa-coercer-test { x array-capacity } ; { T{ boa-coercer-test f 0 } } [ T{ boa-coercer-test } ] unit-test +TUPLE: boa-iac { x integer-array-capacity initial: 77 } ; + +{ fixnum bignum 77 } [ + 30 boa-iac boa x>> class-of + 10 >bignum boa-iac boa x>> class-of + boa-iac new x>> +] unit-test + +[ -99 boa-iac boa ] [ bad-slot-value? ] must-fail-with + ! Make sure that tuple reshaping updates code heap roots TUPLE: code-heap-ref ; diff --git a/core/slots/slots.factor b/core/slots/slots.factor index e3f6ea995b..6d393f1255 100644 --- a/core/slots/slots.factor +++ b/core/slots/slots.factor @@ -203,6 +203,7 @@ M: anonymous-intersection initial-value* { [ dup "initial-value" word-prop ] [ dup "initial-value" word-prop t ] } { [ \ f bootstrap-word over class<= ] [ f t ] } { [ \ array-capacity bootstrap-word over class<= ] [ 0 t ] } + { [ \ integer-array-capacity bootstrap-word over class<= ] [ 0 t ] } { [ bignum bootstrap-word over class<= ] [ 0 >bignum t ] } { [ float bootstrap-word over class<= ] [ 0.0 t ] } { [ string bootstrap-word over class<= ] [ "" t ] }