for i, t1 := range t.RParams() {
shapes[i] = Shapify(t1, i, baseType.RParams()[i])
}
- for j := range t.Methods().Slice() {
+ for j, tmethod := range t.Methods().Slice() {
baseNname := baseType.Methods().Slice()[j].Nname.(*ir.Name)
dictsym := MakeDictSym(baseNname.Sym(), t.RParams(), true)
if dictsym.Def == nil {
ImportedBody(methNode.Func)
methNode.Func.SetExportInline(true)
}
+ // Make sure that any associated types are also exported. (See #52279)
+ p.checkForFullyInst(tmethod.Type)
}
}
--- /dev/null
+package lib
+
+type FMap[K comparable, V comparable] map[K]V
+
+//go:noinline
+func (m FMap[K, V]) Flip() FMap[V, K] {
+ out := make(FMap[V, K])
+ return out
+}
+
+type MyType uint8
+
+const (
+ FIRST MyType = 0
+)
+
+var typeStrs = FMap[MyType, string]{
+ FIRST: "FIRST",
+}
+
+func (self MyType) String() string {
+ return typeStrs[self]
+}
--- /dev/null
+// rundir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored