porting of GH-4022

This commit is contained in:
Vern Paxson 2024-11-12 15:41:20 -08:00
parent c86f9267ff
commit f693f22192
4 changed files with 40 additions and 14 deletions

View file

@ -3241,10 +3241,11 @@ bool VectorVal::Assign(unsigned int index, ValPtr element) {
if ( yield_types ) {
const auto& t = element->GetType();
(*yield_types)[index] = t;
auto& yt_i = (*yield_types)[index];
auto& elem = vector_val[index];
if ( elem )
ZVal::DeleteIfManaged(*elem, t);
ZVal::DeleteIfManaged(*elem, yt_i);
yt_i = t;
elem = ZVal(std::move(element), t);
}
else {