mirror of
https://github.com/golang/go
synced 2024-11-19 15:14:45 -07:00
go/types: remove TODOs from API that cannot be changed (cleanup)
Change-Id: I4e357a250b2f9cfbf780b05c5f54805682b19a62 Reviewed-on: https://go-review.googlesource.com/83935 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
774ae54777
commit
d0b2467966
@ -418,7 +418,6 @@ func (t *Named) NumMethods() int { return len(t.methods) }
|
|||||||
func (t *Named) Method(i int) *Func { return t.methods[i] }
|
func (t *Named) Method(i int) *Func { return t.methods[i] }
|
||||||
|
|
||||||
// SetUnderlying sets the underlying type and marks t as complete.
|
// SetUnderlying sets the underlying type and marks t as complete.
|
||||||
// TODO(gri) determine if there's a better solution rather than providing this function
|
|
||||||
func (t *Named) SetUnderlying(underlying Type) {
|
func (t *Named) SetUnderlying(underlying Type) {
|
||||||
if underlying == nil {
|
if underlying == nil {
|
||||||
panic("types.Named.SetUnderlying: underlying type must not be nil")
|
panic("types.Named.SetUnderlying: underlying type must not be nil")
|
||||||
@ -430,7 +429,6 @@ func (t *Named) SetUnderlying(underlying Type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddMethod adds method m unless it is already in the method list.
|
// AddMethod adds method m unless it is already in the method list.
|
||||||
// TODO(gri) find a better solution instead of providing this function
|
|
||||||
func (t *Named) AddMethod(m *Func) {
|
func (t *Named) AddMethod(m *Func) {
|
||||||
if i, _ := lookupMethod(t.methods, m.pkg, m.name); i < 0 {
|
if i, _ := lookupMethod(t.methods, m.pkg, m.name); i < 0 {
|
||||||
t.methods = append(t.methods, m)
|
t.methods = append(t.methods, m)
|
||||||
|
Loading…
Reference in New Issue
Block a user