(id int)
| 442 | } |
| 443 | |
| 444 | func (d *Decoder) LookupType(id int) (super.Type, error) { |
| 445 | if id < super.IDTypeComplex { |
| 446 | return super.LookupPrimitiveByID(id) |
| 447 | } |
| 448 | d.mu.RLock() |
| 449 | defer d.mu.RUnlock() |
| 450 | off := id - super.IDTypeComplex |
| 451 | if off < len(d.types) { |
| 452 | return d.types[off], nil |
| 453 | } |
| 454 | return nil, fmt.Errorf("no type found for type id %d", id) |
| 455 | } |
| 456 | |
| 457 | func (d *Decoder) enter(typ super.Type) { |
| 458 | // Even though type decoding is single threaded, workers processing a |
no test coverage detected