fix indexed assignment for heterogeneous data

This commit is contained in:
John Kerl 2021-01-04 21:34:45 -05:00
parent bde39756ab
commit ab26b46efa

View file

@ -869,6 +869,9 @@ func (this *IndexedLvalueNode) Assign(
for i, indexEvaluable := range this.indexEvaluables {
index := indexEvaluable.Evaluate(state)
indices[i] = &index
if index.IsAbsent() {
return nil
}
}
// This lets the user do '$y[ ["a", "b", "c"] ] = $x' in lieu of