]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: fix noswiss builder
authorKeith Randall <khr@golang.org>
Tue, 29 Jul 2025 22:31:09 +0000 (15:31 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 30 Jul 2025 14:28:41 +0000 (07:28 -0700)
Missed this change in CL 681936

Fixes #74808

Change-Id: I30f6402177c5f8efe9bd11d50fad1770a22762c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/691675
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Auto-Submit: Keith Randall <khr@google.com>

src/reflect/map_noswiss.go

index 19696a4f4bd858bff83e93718022adfda118cd5e..36f6fab76c400cf46beca5f125ba90b8fcfd26c8 100644 (file)
@@ -69,7 +69,7 @@ func MapOf(key, elem Type) Type {
        var imap any = (map[unsafe.Pointer]unsafe.Pointer)(nil)
        mt := **(**mapType)(unsafe.Pointer(&imap))
        mt.Str = resolveReflectName(newName(s, "", false, false))
-       mt.TFlag = 0
+       mt.TFlag = abi.TFlagDirectIface
        mt.Hash = fnv1(etyp.Hash, 'm', byte(ktyp.Hash>>24), byte(ktyp.Hash>>16), byte(ktyp.Hash>>8), byte(ktyp.Hash))
        mt.Key = ktyp
        mt.Elem = etyp