]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix an error in comments
authormohanson <mohanson@outlook.com>
Wed, 15 Oct 2025 02:27:16 +0000 (10:27 +0800)
committerGopher Robot <gobot@golang.org>
Wed, 15 Oct 2025 20:48:28 +0000 (13:48 -0700)
Remove the redundant only.

Change-Id: I9cf2d84ae080a567ad45a2d0ef002c7c89395479
Reviewed-on: https://go-review.googlesource.com/c/go/+/711960
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>

src/cmd/compile/internal/types2/instantiate.go
src/go/types/instantiate.go

index 1c8c12d07cfafacd534fb15af70afe2aae1faa56..8b24f2fc685b8139cd32ef985ab845991d9b0699 100644 (file)
@@ -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.
index eef473447da414bc2bd19fcf505d825c7569e139..0bccd3dff6b02c94bbcb1d6262dee2e1b38d5e11 100644 (file)
@@ -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.