第一种情况:
sl:=[]int{1,2,3}
psl:=reflect.SliceHeader(sl)
fmt.Println(psl)
报错:cannot convert expression of type []int to type SliceHeader
第二种情况:
var psl []int
sl:=[]int{1,2,3}
psl=reflect.SliceHeader(sl)
fmt.Println(psl)
报错: cannot convert expression of type []int to type SliceHeader; cannot use reflect.SliceHeader(sl) (type SliceHeader) as type []int in assignment
初学go,为什么sliceheader类型和slice类型不能互转?