1
0
mirror of https://github.com/golang/go synced 2024-11-06 09:16:16 -07:00

cmd/compile: remove unused func eqtypenoname

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>
This commit is contained in:
Daniel Martí 2019-01-22 21:27:43 +00:00 committed by Brad Fitzpatrick
parent 7be432e659
commit acf786f4fb

View File

@ -537,26 +537,6 @@ func methtype(t *types.Type) *types.Type {
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.