| 389 | } |
| 390 | |
| 391 | func (c *collectionBuilder) appendSpread(inner super.Type, b scode.Bytes) { |
| 392 | union, _ := super.TypeUnder(inner).(*super.TypeUnion) |
| 393 | for it := b.Iter(); !it.Done(); { |
| 394 | typ := inner |
| 395 | bytes := it.Next() |
| 396 | if union != nil { |
| 397 | typ, bytes = union.Untag(bytes) |
| 398 | } |
| 399 | c.types = append(c.types, typ) |
| 400 | c.bytes = append(c.bytes, bytes) |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | func (c *collectionBuilder) iter(sctx *super.Context) collectionIter { |
| 405 | // uniqueTypes must be copied since super.UniqueTypes operates on the type |