// targetWrap is a utility function to reconstitute a Target
// from an internal type token and a pointer to the value.
targetWrap is a utility function to reconstitute a Target
from an internal type token and a pointer to the value.
// targetWrap is a utility function to reconstitute a Target // from an internal type token and a pointer to the value .
func targetWrap(typeId e.TypeID, x e.Ptr) Target {
	switch TargetTypeID(typeId) {
	case TargetTypeByRefType:
		return (*ByRefType)(x)
	case TargetTypeByRefTypePtr:
		return *(**ByRefType)(x)
	case TargetTypeByValType:
		return (*ByValType)(x)
	case TargetTypeByValTypePtr:
		return *(**ByValType)(x)
	case TargetTypeContainerType:
		return (*ContainerType)(x)
	case TargetTypeContainerTypePtr:
		return *(**ContainerType)(x)
	default:
		panic(fmt.Sprintf("unhandled TypeID %d", typeId))
	}
}
func targetWrap ( typeId e . TypeID , x e . Ptr ) Target { switch TargetTypeID ( typeId ) { case TargetTypeByRefType : return ( * ByRefType ) ( x ) case TargetTypeByRefTypePtr : return * ( * * ByRefType ) ( x ) case TargetTypeByValType : return ( * ByValType ) ( x ) case TargetTypeByValTypePtr : return * ( * * ByValType ) ( x ) case TargetTypeContainerType : return ( * ContainerType ) ( x ) case TargetTypeContainerTypePtr : return * ( * * ContainerType ) ( x ) default : panic ( fmt . Sprintf ( " " , typeId ) ) } }
targetWrap is a utility function to reconstitute a Target
from an internal type token and a pointer to the value.
targetWrap is a utility function to reconstitute a Target from an internal type token and a pointer to the value .
// This is likely a code-generation problem.