Its only use was removed in golang.org/cl/114797, committed in October
2018.
Change-Id: I6560ccfb10d7c763f6470b20c853716779c18cee
Reviewed-on: https://go-review.googlesource.com/c/158897
Run-TryBot: Daniel Martà <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
return nil
}
-// Are t1 and t2 equal struct types when field names are ignored?
-// For deciding whether the result struct from g can be copied
-// directly when compiling f(g()).
-func eqtypenoname(t1 *types.Type, t2 *types.Type) bool {
- if t1 == nil || t2 == nil || !t1.IsStruct() || !t2.IsStruct() {
- return false
- }
-
- if t1.NumFields() != t2.NumFields() {
- return false
- }
- for i, f1 := range t1.FieldSlice() {
- f2 := t2.Field(i)
- if !types.Identical(f1.Type, f2.Type) {
- return false
- }
- }
- return true
-}
-
// Is type src assignment compatible to type dst?
// If so, return op code to use in conversion.
// If not, return 0.