(typ *super.TypeRecord, bytes scode.Bytes, name string)
| 129 | } |
| 130 | |
| 131 | func derefWithNone(typ *super.TypeRecord, bytes scode.Bytes, name string) (super.Value, bool, bool) { |
| 132 | n, ok := typ.IndexOfField(name) |
| 133 | if !ok { |
| 134 | return super.Value{}, false, false |
| 135 | } |
| 136 | var elem scode.Bytes |
| 137 | var none bool |
| 138 | for i, it := 0, scode.NewRecordIter(bytes, typ.Opts); i <= n; i++ { |
| 139 | elem, none = it.Next(typ.Fields[i].Opt) |
| 140 | } |
| 141 | if none { |
| 142 | return super.Value{}, true, true |
| 143 | } |
| 144 | return super.NewValue(typ.Fields[n].Type, elem), true, false |
| 145 | } |
| 146 | |
| 147 | func (c *cast) toArrayOrSet(from super.Value, to super.Type) (super.Value, bool) { |
| 148 | fromInner := super.InnerType(from.Type()) |
no test coverage detected