1
0
mirror of https://github.com/golang/go synced 2024-11-18 23:05:06 -07:00

all: revert uses of types.NewInterfaceType

It was added in Go 1.11, so technically we don't need to support Go
1.10, but we probably still should.

Change-Id: I8d5f0d7e5ae822f9536d9c332319186c703cdb34
Reviewed-on: https://go-review.googlesource.com/c/tools/+/216939
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
Rebecca Stambler 2020-01-29 19:10:37 -05:00 committed by Heschi Kreinick
parent 4e65565728
commit 2f3ba24bd6
2 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ func (p *parser) parseInterfaceType(parent *types.Package) types.Type {
// Complete requires the type's embedded interfaces to be fully defined,
// but we do not define any
return types.NewInterfaceType(methods, nil).Complete()
return newInterface(methods, nil).Complete()
}
// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type .

View File

@ -58,7 +58,7 @@ var (
tString = types.Typ[types.String]
tUntypedNil = types.Typ[types.UntypedNil]
tRangeIter = &opaqueType{nil, "iter"} // the type of all "range" iterators
tEface = types.NewInterfaceType(nil, nil).Complete()
tEface = types.NewInterface(nil, nil).Complete()
// SSA Value constants.
vZero = intConst(0)