| ... | @@ -3002,6 +3002,15 @@ pub const Value = extern union { | ... | @@ -3002,6 +3002,15 @@ pub const Value = extern union { |
| 3002 | const data = val.castTag(.elem_ptr).?.data; | 3002 | const data = val.castTag(.elem_ptr).?.data; |
| 3003 | return data.array_ptr.elemValueAdvanced(mod, index + data.index, arena, buffer); | 3003 | return data.array_ptr.elemValueAdvanced(mod, index + data.index, arena, buffer); |
| 3004 | }, | 3004 | }, |
| | 3005 | .field_ptr => { |
| | 3006 | const data = val.castTag(.field_ptr).?.data; |
| | 3007 | if (data.container_ptr.pointerDecl()) |decl_index| { |
| | 3008 | const container_decl = mod.declPtr(decl_index); |
| | 3009 | const field_type = data.container_ty.structFieldType(data.field_index); |
| | 3010 | const field_val = container_decl.val.fieldValue(field_type, data.field_index); |
| | 3011 | return field_val.elemValueAdvanced(mod, index, arena, buffer); |
| | 3012 | } else unreachable; |
| | 3013 | }, |
| 3005 | | 3014 | |
| 3006 | // The child type of arrays which have only one possible value need | 3015 | // The child type of arrays which have only one possible value need |
| 3007 | // to have only one possible value itself. | 3016 | // to have only one possible value itself. |