case "orig":
continue
}
- switch typName + "." + v.Name() {
- case "AddStringExpr.Alloc":
- continue
- }
f(v.Name(), func(t types.Type) bool { return types.Identical(t, v.Type()) })
}
}
n.Fields = nil
}
-func deepCopyFields(pos src.XPos, fields []*Field) []*Field {
- var out []*Field
- for _, f := range fields {
- out = append(out, f.deepCopy(pos))
- }
- return out
-}
-
// An InterfaceType represents a struct { ... } type syntax.
type InterfaceType struct {
miniType
}
}
-func (f *Field) deepCopy(pos src.XPos) *Field {
- if f == nil {
- return nil
- }
- fpos := pos
- if !pos.IsKnown() {
- fpos = f.Pos
- }
- decl := f.Decl
- if decl != nil {
- decl = DeepCopy(pos, decl).(*Name)
- }
- ntype := f.Ntype
- if ntype != nil {
- ntype = DeepCopy(pos, ntype).(Ntype)
- }
- // No keyed literal here: if a new struct field is added, we want this to stop compiling.
- return &Field{fpos, f.Sym, ntype, f.Type, f.Embedded, f.IsDDD, f.Note, decl}
-}
-
// A SliceType represents a []Elem type syntax.
// If DDD is true, it's the ...Elem at the end of a function list.
type SliceType struct {