Documentation
¶
Overview ¶
Package crosspkg holds types used by tests in the parent `tests` package to exercise cross-package code generation paths in genproto2. The types live in a child package so that, from the tests package's perspective, their reflect.Type has a different PkgPath() than the target.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoxedInt ¶
type BoxedInt struct {
V int64
}
BoxedInt is an AminoMarshaler whose repr is a same-package struct. When a tests-package type uses BoxedInt as a field, the repr decode in gen_unmarshal.go writeReprUnmarshal references `crosspkg.Inner` which must be qualified. A regression to `var repr Inner` fails to compile.
func (BoxedInt) MarshalAmino ¶
func (*BoxedInt) UnmarshalAmino ¶
type SmallCount ¶
type SmallCount uint8
SmallCount is an AminoMarshaler with uint8 repr. When used as []*crosspkg.SmallCount in a struct field, it exercises the packed-list + pointer + cross-package branch in gen_marshal.go's writeUnpackedListMarshal. A regression to `new(SmallCount)` (bare name) fails to compile from tests/.
func (SmallCount) MarshalAmino ¶
func (c SmallCount) MarshalAmino() (uint8, error)
func (*SmallCount) UnmarshalAmino ¶
func (c *SmallCount) UnmarshalAmino(repr uint8) error