Add type parameterization to variations getter

I have encountered some cases where having a non-parameterized vector can
crash a downstream process. I don't yet know how to make a MWE of that, but
adding type parameters fixes my problem, and doesn't break any tests here.
This commit is contained in:
Thomas A. Christensen II 2022-11-22 10:23:34 -06:00
parent 752b482a0b
commit 3b33c85d00

View file

@ -463,10 +463,10 @@ function translate(var::Variation{S, T}, aln::PairwiseAlignment{S, S}) where {S,
end
end
function variations(v::Variant)
vs = Vector{Variation}(undef, length(edits(v)))
function variations(v::Variant{S,T}) where {S,T}
vs = Vector{Variation{S,T}}(undef, length(edits(v)))
for (i, e) in enumerate(edits(v))
vs[i] = Variation(reference(v), e)
vs[i] = Variation{S,T}(reference(v), e)
end
return vs
end