aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/typecheck/subr.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/subr.go b/src/cmd/compile/internal/typecheck/subr.go
index 96e120fe03..1986845f64 100644
--- a/src/cmd/compile/internal/typecheck/subr.go
+++ b/src/cmd/compile/internal/typecheck/subr.go
@@ -1421,7 +1421,9 @@ func Shapify(t *types.Type, index int) *types.Type {
// All pointers have the same shape.
// TODO: Make unsafe.Pointer the same shape as normal pointers.
- if u.Kind() == types.TPTR {
+ // Note: pointers to arrays are special because of slice-to-array-pointer
+ // conversions. See issue 49295.
+ if u.Kind() == types.TPTR && u.Elem().Kind() != types.TARRAY {
u = types.Types[types.TUINT8].PtrTo()
}