(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value)
| 510 | } |
| 511 | |
| 512 | func (s intSliceSerializer) Read(ctx *ReadContext, refMode RefMode, readType bool, hasGenerics bool, value reflect.Value) { |
| 513 | done, typeId := readSliceRefAndType(ctx, refMode, readType, value) |
| 514 | if done || ctx.HasError() { |
| 515 | return |
| 516 | } |
| 517 | if readType { |
| 518 | var expected TypeId = INT32_ARRAY |
| 519 | if strconv.IntSize == 64 { |
| 520 | expected = INT64_ARRAY |
| 521 | } |
| 522 | if typeId != uint32(expected) { |
| 523 | ctx.SetError(DeserializationErrorf("slice type mismatch: expected %d, got %d", expected, typeId)) |
| 524 | return |
| 525 | } |
| 526 | } |
| 527 | s.ReadData(ctx, value) |
| 528 | } |
| 529 | |
| 530 | func (s intSliceSerializer) ReadWithTypeInfo(ctx *ReadContext, refMode RefMode, typeInfo *TypeInfo, value reflect.Value) { |
| 531 | s.Read(ctx, refMode, false, false, value) |
no test coverage detected