Skip to content

Commit e2e9b21

Browse files
committed
fix: ValueInterface checker of packing
1 parent bebbe18 commit e2e9b21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ValueInterface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ function _check_get_number_type(x)
6767
end
6868
end
6969
function _check_pack_scalar_constants!(x)
70-
packed_x = Vector{typeof(x)}(undef, count_scalar_constants(x))
70+
packed_x = Vector{get_number_type(typeof(x))}(undef, count_scalar_constants(x))
7171
new_idx = pack_scalar_constants!(packed_x, 1, x)
7272
return new_idx == 1 + count_scalar_constants(x)
7373
end
7474
function _check_unpack_scalar_constants(x)
75-
packed_x = Vector{typeof(x)}(undef, count_scalar_constants(x))
75+
packed_x = Vector{get_number_type(typeof(x))}(undef, count_scalar_constants(x))
7676
pack_scalar_constants!(packed_x, 1, x)
7777
new_idx, x2 = unpack_scalar_constants(packed_x, 1, x)
7878
return new_idx == 1 + count_scalar_constants(x) && x2 == x

0 commit comments

Comments
 (0)