Example #1
0
func regSizeCastable(to, from types.T) bool {
	if types.IsPointer(to) && types.IsPointer(from) {
		return true
	}
	if isPointerType(to) && types.IsBasic(from, types.Uint) {
		return true
	}
	if types.IsBasic(to, types.Uint) && isPointerType(from) {
		return true
	}
	return false
}
Example #2
0
func isPointerType(t types.T) bool {
	return types.IsPointer(t) || types.IsFuncPointer(t)
}