using DynamicPPL, BangBang
vnt = VarNamedTuple()
vnt = BangBang.setindex!!(vnt, 1.0, @varname(a[1]))
vnt = BangBang.setindex!!(vnt, 2.0, @varname(a[2]))
vnt[@varname(a[1:2])]
#=
┌ Warning: Returning a `Base.Array` with a presumed size based on the indices used to set values; but this may not be the actual shape or size of the actual `AbstractArray` that was inside the DynamicPPL model. You should inspect the returned Array to make sure that it has the shape and type you expect.
└ @ DynamicPPL.VarNamedTuples ~/ppl/dppl/src/varnamedtuple/partial_array.jl:800
2-element Vector{Float64}:
1.0
2.0
=#
This is too strict. It should warn on a[:], or a, or a[end], but not a[1:2].
This is too strict. It should warn on
a[:], ora, ora[end], but nota[1:2].