diff options
| author | Mark Freeman <mark@golang.org> | 2026-03-26 13:57:10 -0400 |
|---|---|---|
| committer | Mark Freeman <mark@golang.org> | 2026-03-26 16:38:38 -0700 |
| commit | 2dbd51e3b4bf29e6204caf0465258ced601494a2 (patch) | |
| tree | f2900f41931d168c10cd7a9615e9888c1031fca7 /src/cmd/compile/internal/noder/reader.go | |
| parent | b4a084d3280331230cd6a8028cbb6e671b5af9cf (diff) | |
| download | go-2dbd51e3b4bf29e6204caf0465258ced601494a2.tar.xz | |
cmd/compile/internal/noder: set hasShape for shaped functions
A signature with a shape will be overwritten using shapeSig, but it
arguably still has a shape because it's using a shaped dictionary.
This mimics the approach for ObjType.
Change-Id: I4646cd73129606772a9218662de76a37217366b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/759721
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/reader.go')
| -rw-r--r-- | src/cmd/compile/internal/noder/reader.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index fb5a099efe..e4f2a39acb 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -792,6 +792,10 @@ func (pr *pkgReader) objIdxMayFail(idx index, implicits, explicits []*types.Type fpos := r.pos() fn := ir.NewFunc(fpos, npos, sym, typ) + if r.hasTypeParams() && r.dict.shaped { + typ.SetHasShape(true) + } + name := fn.Nname if !sym.IsBlank() { if sym.Def != nil { |
