(typ *super.TypeRecord, b scode.Bytes)
| 37 | } |
| 38 | |
| 39 | func (n *Flatten) innerTypeOf(typ *super.TypeRecord, b scode.Bytes) super.Type { |
| 40 | n.types = n.appendTypes(n.types[:0], b, typ) |
| 41 | unique := super.UniqueTypes(n.types) |
| 42 | if len(unique) == 1 { |
| 43 | return unique[0] |
| 44 | } |
| 45 | return n.sctx.LookupTypeUnion(unique) |
| 46 | } |
| 47 | |
| 48 | func (n *Flatten) appendTypes(types []super.Type, b scode.Bytes, typ *super.TypeRecord) []super.Type { |
| 49 | it := scode.NewRecordIter(b, typ.Opts) |
no test coverage detected