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

@@ -459,7 +459,7 @@ func (obj *StructLookupPolyFunc) Info() *interfaces.Info {
var sig *types.Type
if obj.Type != nil { // don't panic if called speculatively
// TODO: can obj.Out be nil (a partial) ?
sig = types.NewType(fmt.Sprintf("func(struct %s, field str) %s", obj.Type.String(), obj.Out.String()))
sig = types.NewType(fmt.Sprintf("func(%s %s, %s str) %s", structLookupArgNameStruct, obj.Type.String(), structLookupArgNameField, obj.Out.String()))
}
return &interfaces.Info{
Pure: true,