lang: funcs: Use more constants to build types

This commit is contained in:
James Shubin
2023-06-29 15:31:12 -04:00
parent df9b338279
commit d37862b123
5 changed files with 6 additions and 6 deletions

View File

@@ -348,7 +348,7 @@ func (obj *ContainsPolyFunc) Info() *interfaces.Info {
var sig *types.Type
if obj.Type != nil { // don't panic if called speculatively
s := obj.Type.String()
sig = types.NewType(fmt.Sprintf("func(needle %s, haystack []%s) bool", s, s))
sig = types.NewType(fmt.Sprintf("func(%s %s, %s []%s) bool", containsArgNameNeedle, s, containsArgNameHaystack, s))
}
return &interfaces.Info{
Pure: true,