diff --git a/src/cmd/compile/internal/gc/sizeof_test.go b/src/cmd/compile/internal/gc/sizeof_test.go index 55b400f3966aa..6d130b7ead4d6 100644 --- a/src/cmd/compile/internal/gc/sizeof_test.go +++ b/src/cmd/compile/internal/gc/sizeof_test.go @@ -27,7 +27,7 @@ func TestSizeof(t *testing.T) { {Param{}, 28, 56}, {Node{}, 84, 136}, {Sym{}, 64, 112}, - {Type{}, 60, 96}, + {Type{}, 52, 88}, {MapType{}, 20, 40}, {ForwardType{}, 20, 32}, {FuncType{}, 28, 48}, diff --git a/src/cmd/compile/internal/gc/type.go b/src/cmd/compile/internal/gc/type.go index 8beba292f6ca5..f9e3b60d7bf5c 100644 --- a/src/cmd/compile/internal/gc/type.go +++ b/src/cmd/compile/internal/gc/type.go @@ -150,9 +150,8 @@ type Type struct { sliceOf *Type ptrTo *Type - Sym *Sym // symbol containing name, for named types - Vargen int32 // unique name for OTYPE/ONAME - Pos src.XPos // position at which this type was declared, implicitly or explicitly + Sym *Sym // symbol containing name, for named types + Vargen int32 // unique name for OTYPE/ONAME Etype EType // kind of type Trecur uint8 // to detect loops @@ -408,7 +407,6 @@ func typ(et EType) *Type { t := &Type{ Etype: et, Width: BADWIDTH, - Pos: lineno, } t.Orig = t // TODO(josharian): lazily initialize some of these?