mirror of
https://github.com/golang/go
synced 2024-11-23 14:10:05 -07:00
go/types: switch uses of NewSignature to NewSignatureType (cleanup)
Change-Id: I05ed5806e2a35a57ef3e8c9275a157574abcb0ff Reviewed-on: https://go-review.googlesource.com/c/go/+/353399 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
6a79f35806
commit
822f349eb9
@ -599,7 +599,7 @@ func (p *parser) parseNamedType(nlist []interface{}) types.Type {
|
||||
p.skipInlineBody()
|
||||
p.expectEOL()
|
||||
|
||||
sig := types.NewSignature(receiver, params, results, isVariadic)
|
||||
sig := types.NewSignatureType(receiver, nil, nil, params, results, isVariadic)
|
||||
nt.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig))
|
||||
}
|
||||
}
|
||||
@ -766,7 +766,7 @@ func (p *parser) parseFunctionType(pkg *types.Package, nlist []interface{}) *typ
|
||||
params, isVariadic := p.parseParamList(pkg)
|
||||
results := p.parseResultList(pkg)
|
||||
|
||||
*t = *types.NewSignature(nil, params, results, isVariadic)
|
||||
*t = *types.NewSignatureType(nil, nil, nil, params, results, isVariadic)
|
||||
return t
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ func defPredeclaredTypes() {
|
||||
obj := NewTypeName(token.NoPos, nil, "error", nil)
|
||||
obj.setColor(black)
|
||||
res := NewVar(token.NoPos, nil, "", Typ[String])
|
||||
sig := NewSignature(nil, nil, NewTuple(res), false)
|
||||
sig := NewSignatureType(nil, nil, nil, nil, NewTuple(res), false)
|
||||
err := NewFunc(token.NoPos, nil, "Error", sig)
|
||||
ityp := &Interface{nil, obj, []*Func{err}, nil, nil, true, nil}
|
||||
computeInterfaceTypeSet(nil, token.NoPos, ityp) // prevent races due to lazy computation of tset
|
||||
|
Loading…
Reference in New Issue
Block a user