(rec map[string]fieldValue)
| 229 | } |
| 230 | |
| 231 | func (r *recordSpreadExpr) invalidate(rec map[string]fieldValue) { |
| 232 | n := len(rec) |
| 233 | r.fields = slices.Grow(r.fields[:0], n)[:n] |
| 234 | r.vals = slices.Grow(r.vals[:0], n)[:n] |
| 235 | for name, fv := range rec { |
| 236 | typ := fv.none |
| 237 | if typ == nil { |
| 238 | typ = fv.value.Type() |
| 239 | } |
| 240 | r.fields[fv.index] = super.NewFieldWithOpt(name, typ, fv.opt) |
| 241 | r.vals[fv.index] = fv |
| 242 | } |
| 243 | r.cache = r.sctx.MustLookupTypeRecord(r.fields) |
| 244 | } |
| 245 | |
| 246 | type VectorElem struct { |
| 247 | Value Evaluator |
no test coverage detected