From: mohanson Date: Wed, 15 Oct 2025 02:27:16 +0000 (+0800) Subject: cmd/compile: fix an error in comments X-Git-Tag: go1.26rc1~605 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0984dcd757;p=gostls13.git cmd/compile: fix an error in comments Remove the redundant only. Change-Id: I9cf2d84ae080a567ad45a2d0ef002c7c89395479 Reviewed-on: https://go-review.googlesource.com/c/go/+/711960 Auto-Submit: Robert Findley Reviewed-by: Robert Griesemer Reviewed-by: Robert Findley TryBot-Bypass: Robert Griesemer --- diff --git a/src/cmd/compile/internal/types2/instantiate.go b/src/cmd/compile/internal/types2/instantiate.go index 1c8c12d07c..8b24f2fc68 100644 --- a/src/cmd/compile/internal/types2/instantiate.go +++ b/src/cmd/compile/internal/types2/instantiate.go @@ -83,7 +83,7 @@ func Instantiate(ctxt *Context, orig Type, targs []Type, validate bool) (Type, e // // For Named types the resulting instance may be unexpanded. // -// check may be nil (when not type-checking syntax); pos is used only only if check is non-nil. +// check may be nil (when not type-checking syntax); pos is used only if check is non-nil. func (check *Checker) instance(pos syntax.Pos, orig genericType, targs []Type, expanding *Named, ctxt *Context) (res Type) { // The order of the contexts below matters: we always prefer instances in the // expanding instance context in order to preserve reference cycles. diff --git a/src/go/types/instantiate.go b/src/go/types/instantiate.go index eef473447d..0bccd3dff6 100644 --- a/src/go/types/instantiate.go +++ b/src/go/types/instantiate.go @@ -86,7 +86,7 @@ func Instantiate(ctxt *Context, orig Type, targs []Type, validate bool) (Type, e // // For Named types the resulting instance may be unexpanded. // -// check may be nil (when not type-checking syntax); pos is used only only if check is non-nil. +// check may be nil (when not type-checking syntax); pos is used only if check is non-nil. func (check *Checker) instance(pos token.Pos, orig genericType, targs []Type, expanding *Named, ctxt *Context) (res Type) { // The order of the contexts below matters: we always prefer instances in the // expanding instance context in order to preserve reference cycles.