1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:16:10 -07:00

go/gcimporter15: create dummy "anyType" to fix breakage

The previous CL added a duplicate InvalidType to the predecl table so
that it tracked the one used by gc, but this caused it to fail an
assertion of uniqueness, and I ran the wrong tests.

Change-Id: I56342046cea328e503d917127f5b12205df7999a
Reviewed-on: https://go-review.googlesource.com/20870
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2016-03-18 13:09:10 -04:00
parent 8a9be374d7
commit fcde77432e

View File

@ -692,7 +692,11 @@ var predeclared = []types.Type{
// invalid type
types.Typ[types.Invalid], // only appears in packages with errors
// TODO(mdempsky): Provide an actual Type value to represent "any"?
// (Why exactly does gc emit the "any" type?)
types.Typ[types.Invalid],
// used internally by gc; never used by this package or in .a files
anyType{},
}
type anyType struct{}
func (t anyType) Underlying() types.Type { return t }
func (t anyType) String() string { return "any" }