]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/types, types2: use go.dev/issue/nnnnn when referring to an issue (cleanup)
authorRobert Griesemer <gri@golang.org>
Tue, 31 Jan 2023 22:59:19 +0000 (14:59 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 1 Feb 2023 21:31:01 +0000 (21:31 +0000)
Follow-up on CL 462856 which missed a few places.
Fixed manually.

Change-Id: I924560ecae8923d9228027016805a3cc892f8ac2
Reviewed-on: https://go-review.googlesource.com/c/go/+/463749
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>

18 files changed:
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/expr.go
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/lookup.go
src/cmd/compile/internal/types2/signature.go
src/cmd/compile/internal/types2/stdlib_test.go
src/cmd/compile/internal/types2/stmt.go
src/cmd/compile/internal/types2/typexpr.go
src/cmd/compile/internal/types2/unify.go
src/go/types/builtins.go
src/go/types/decl.go
src/go/types/expr.go
src/go/types/infer.go
src/go/types/lookup.go
src/go/types/signature.go
src/go/types/stdlib_test.go
src/go/types/testdata/local/shifts.go
src/go/types/unify.go

index 1544ee11f4bad3eeabcd0be82001452290f5718e..0ac0f6196af3c6298b8882fed4df73097ed4e754 100644 (file)
@@ -405,7 +405,7 @@ func (check *Checker) constDecl(obj *Const, typ, init syntax.Expr, inherited boo
                        // expression and not the current constant declaration. Use
                        // the constant identifier position for any errors during
                        // init expression evaluation since that is all we have
-                       // (see issues #42991, #42992).
+                       // (see issues go.dev/issue/42991, go.dev/issue/42992).
                        check.errpos = obj.pos
                }
                check.expr(&x, init)
index 472e30a0698a645ca41dc0a2b9cbc55436ce241f..0be2a4533caf6636f0d438b8756c75bbd63a1b75 100644 (file)
@@ -960,7 +960,7 @@ func (check *Checker) shift(x, y *operand, e syntax.Expr, op syntax.Operator) {
 
                if isUntyped(y.typ) {
                        // Caution: Check for representability here, rather than in the switch
-                       // below, because isInteger includes untyped integers (was bug #43697).
+                       // below, because isInteger includes untyped integers (was bug go.dev/issue/43697).
                        check.representable(y, Typ[Uint])
                        if y.mode == invalid {
                                x.mode = invalid
@@ -978,7 +978,7 @@ func (check *Checker) shift(x, y *operand, e syntax.Expr, op syntax.Operator) {
                        }
                case isUntyped(y.typ):
                        // This is incorrect, but preserves pre-existing behavior.
-                       // See also bug #47410.
+                       // See also go.dev/issue/47410.
                        check.convertUntyped(y, Typ[Uint])
                        if y.mode == invalid {
                                x.mode = invalid
@@ -1355,11 +1355,11 @@ func (check *Checker) exprInternal(x *operand, e syntax.Expr, hint Type) exprKin
                                // init expression/func declaration which contains
                                // them: use existing package-level declaration info.
                                decl := check.decl // capture for use in closure below
-                               iota := check.iota // capture for use in closure below (#22345)
+                               iota := check.iota // capture for use in closure below (go.dev/issue/22345)
                                // Don't type-check right away because the function may
                                // be part of a type definition to which the function
                                // body refers. Instead, type-check as soon as possible,
-                               // but before the enclosing scope contents changes (#22992).
+                               // but before the enclosing scope contents changes (go.dev/issue/22992).
                                check.later(func() {
                                        check.funcBody(decl, "<function literal>", sig, e.Body, iota)
                                }).describef(e, "func literal")
index b9defb3e81aa214cb85cec5df9442b1d542f9711..24213134f5f9aa1596703d779fa69f808547d8e8 100644 (file)
@@ -505,7 +505,7 @@ func (check *Checker) inferB(tparams []*TypeParam, targs []Type) (types []Type,
                                        // For instance, given [P T1|T2, ...] where the type argument for P is (named
                                        // type) T1, and T1 and T2 have the same built-in (named) type T0 as underlying
                                        // type, the core type will be the named type T0, which doesn't match T1.
-                                       // Yet the instantiation of P with T1 is clearly valid (see #53650).
+                                       // Yet the instantiation of P with T1 is clearly valid (see go.dev/issue/53650).
                                        // Reporting an error if unification fails would be incorrect in this case.
                                        // On the other hand, it is safe to ignore failing unification during constraint
                                        // type inference because if the failure is true, an error will be reported when
index 96d87fe66a7b68d396691245b67d1b9885e1122c..0c3b96ff2d282ebc8ff66724e74830b0bd298b98 100644 (file)
@@ -399,7 +399,8 @@ func (check *Checker) missingMethodCause(V, T Type, m, alt *Func) string {
 
                altS, mS := check.funcString(alt, false), check.funcString(m, false)
                if altS == mS {
-                       // Would tell the user that Foo isn't a Foo, add package information to disambiguate.  See #54258.
+                       // Would tell the user that Foo isn't a Foo, add package information to disambiguate.
+                       // See go.dev/issue/54258.
                        altS, mS = check.funcString(alt, true), check.funcString(m, true)
                }
 
index 61c6721f806777fa0c70897b19d78c92f0fb234c..8e0dfe2881aa158fe2e8348df8455f8ca10b5904 100644 (file)
@@ -154,7 +154,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *syntax.Field, tparams []
                        } else if len(tparams) < len(recvTParams) {
                                // Reporting an error here is a stop-gap measure to avoid crashes in the
                                // compiler when a type parameter/argument cannot be inferred later. It
-                               // may lead to follow-on errors (see issues #51339, #51343).
+                               // may lead to follow-on errors (see issues go.dev/issue/51339, go.dev/issue/51343).
                                // TODO(gri) find a better solution
                                got := measure(len(tparams), "type parameter")
                                check.errorf(recvPar, BadRecv, "got %s, but receiver base type declares %d", got, len(recvTParams))
@@ -204,7 +204,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *syntax.Field, tparams []
                sig.recv = recv
 
                // Delay validation of receiver type as it may cause premature expansion
-               // of types the receiver type is dependent on (see issues #51232, #51233).
+               // of types the receiver type is dependent on (see issues go.dev/issue/51232, go.dev/issue/51233).
                check.later(func() {
                        // spec: "The receiver type must be of the form T or *T where T is a type name."
                        rtyp, _ := deref(recv.typ)
index 28df06c98960e1106552fc79dfa19ba348ef4beb..c5903a12d381425969076acf4ca9f4289eaebddf 100644 (file)
@@ -222,7 +222,7 @@ func TestStdKen(t *testing.T) {
 var excluded = map[string]bool{
        "builtin": true,
 
-       // See #46027: some imports are missing for this submodule.
+       // go.dev/issue/46027: some imports are missing for this submodule.
        "crypto/internal/edwards25519/field/_asm": true,
        "crypto/internal/bigmod/_asm":             true,
 }
index 1ddaef39abf6b8f70d47f793a49301668c6da95c..f87ef11b988ba4d4f4b2fa18c0b2d7f56ffaf874 100644 (file)
@@ -796,7 +796,7 @@ func (check *Checker) typeSwitchStmt(inner stmtContext, s *syntax.SwitchStmt, gu
                        }
                        obj := NewVar(lhs.Pos(), check.pkg, lhs.Value, T)
                        // TODO(mdempsky): Just use clause.Colon? Why did I even suggest
-                       // "at the end of the TypeSwitchCase" in #16794 instead?
+                       // "at the end of the TypeSwitchCase" in go.dev/issue/16794 instead?
                        scopePos := clause.Pos() // for default clause (len(List) == 0)
                        if n := len(cases); n > 0 {
                                scopePos = syntax.EndPos(cases[n-1])
index cddc7f070bc1463c07305360f37ad3caa7f0d53f..9fe9c17803a09e6f14541af21e7c24031a6f36f7 100644 (file)
@@ -325,7 +325,7 @@ func (check *Checker) typInternal(e0 syntax.Expr, def *Named) (T Type) {
                        // If typ.base is invalid, it's unlikely that *base is particularly
                        // useful - even a valid dereferenciation will lead to an invalid
                        // type again, and in some cases we get unexpected follow-on errors
-                       // (e.g., see #49005). Return an invalid type instead.
+                       // (e.g., go.dev/issue/49005). Return an invalid type instead.
                        if typ.base == Typ[Invalid] {
                                return Typ[Invalid]
                        }
index bdafdf9c6a9b9fb6127e06758dbf3f4244edc758..aff8a147e42b089e7435bce1304ecc7666ef43e0 100644 (file)
@@ -14,7 +14,7 @@ import (
 
 const (
        // Upper limit for recursion depth. Used to catch infinite recursions
-       // due to implementation issues (e.g., see issues #48619, #48656).
+       // due to implementation issues (e.g., see issues go.dev/issue/48619, go.dev/issue/48656).
        unificationDepthLimit = 50
 
        // Whether to panic when unificationDepthLimit is reached.
index 938e85ed68905347e0253973609769e0540c0638..0783f921eb46f4d0a9f1fab75d9c23aac6a4899a 100644 (file)
@@ -946,7 +946,7 @@ func (check *Checker) applyTypeFunc(f func(Type) Type, x *operand, id builtinId)
 
                // We can type-check this fine but we're introducing a synthetic
                // type parameter for the result. It's not clear what the API
-               // implications are here. Report an error for 1.18 (see #50912),
+               // implications are here. Report an error for 1.18 (see go.dev/issue/50912),
                // but continue type-checking.
                var code Code
                switch id {
index 7d9cc1757b13dd6cb0709f95416c7e1e6b8c1f45..393d8f34e2301eecb7a3c2fb3e5eb629a97ae10f 100644 (file)
@@ -474,7 +474,7 @@ func (check *Checker) constDecl(obj *Const, typ, init ast.Expr, inherited bool)
                        // expression and not the current constant declaration. Use
                        // the constant identifier position for any errors during
                        // init expression evaluation since that is all we have
-                       // (see issues #42991, #42992).
+                       // (see issues go.dev/issue/42991, go.dev/issue/42992).
                        check.errpos = atPos(obj.pos)
                }
                check.expr(&x, init)
index f09a29b1260096d553a3316c6a835fe5fa1798a6..d67bc8b756407d124b087e29a04dc8b38d88c3aa 100644 (file)
@@ -695,7 +695,7 @@ func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, const
                        if !hasNil(target) {
                                return nil, nil, InvalidUntypedConversion
                        }
-                       // Preserve the type of nil as UntypedNil: see #13061.
+                       // Preserve the type of nil as UntypedNil: see go.dev/issue/13061.
                        return Typ[UntypedNil], nil, 0
                default:
                        return nil, nil, InvalidUntypedConversion
@@ -711,7 +711,7 @@ func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, const
                        }) {
                                return nil, nil, InvalidUntypedConversion
                        }
-                       // keep nil untyped (was bug #39755)
+                       // keep nil untyped (was bug go.dev/issue/39755)
                        if x.isNil() {
                                return Typ[UntypedNil], nil, 0
                        }
@@ -938,7 +938,7 @@ func (check *Checker) shift(x, y *operand, e ast.Expr, op token.Token) {
 
                if isUntyped(y.typ) {
                        // Caution: Check for representability here, rather than in the switch
-                       // below, because isInteger includes untyped integers (was bug #43697).
+                       // below, because isInteger includes untyped integers (was bug go.dev/issue/43697).
                        check.representable(y, Typ[Uint])
                        if y.mode == invalid {
                                x.mode = invalid
@@ -956,7 +956,7 @@ func (check *Checker) shift(x, y *operand, e ast.Expr, op token.Token) {
                        }
                case isUntyped(y.typ):
                        // This is incorrect, but preserves pre-existing behavior.
-                       // See also bug #47410.
+                       // See also go.dev/issue/47410.
                        check.convertUntyped(y, Typ[Uint])
                        if y.mode == invalid {
                                x.mode = invalid
@@ -1333,11 +1333,11 @@ func (check *Checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind {
                                // init expression/func declaration which contains
                                // them: use existing package-level declaration info.
                                decl := check.decl // capture for use in closure below
-                               iota := check.iota // capture for use in closure below (#22345)
+                               iota := check.iota // capture for use in closure below (go.dev/issue/22345)
                                // Don't type-check right away because the function may
                                // be part of a type definition to which the function
                                // body refers. Instead, type-check as soon as possible,
-                               // but before the enclosing scope contents changes (#22992).
+                               // but before the enclosing scope contents changes (go.dev/issue/22992).
                                check.later(func() {
                                        check.funcBody(decl, "<function literal>", sig, e.Body, iota)
                                }).describef(e, "func literal")
index 70d256bed7ef3e0e16fcc754619f3e6deaf97491..9589b0749af2f8a971e356b799be3c1c95d3d720 100644 (file)
@@ -507,7 +507,7 @@ func (check *Checker) inferB(tparams []*TypeParam, targs []Type) (types []Type,
                                        // For instance, given [P T1|T2, ...] where the type argument for P is (named
                                        // type) T1, and T1 and T2 have the same built-in (named) type T0 as underlying
                                        // type, the core type will be the named type T0, which doesn't match T1.
-                                       // Yet the instantiation of P with T1 is clearly valid (see #53650).
+                                       // Yet the instantiation of P with T1 is clearly valid (see go.dev/issue/53650).
                                        // Reporting an error if unification fails would be incorrect in this case.
                                        // On the other hand, it is safe to ignore failing unification during constraint
                                        // type inference because if the failure is true, an error will be reported when
index 2d6501b7390a874432b77bf29368b305dec7fd33..331c308656e24b238497850851c508c698eccdbb 100644 (file)
@@ -401,7 +401,8 @@ func (check *Checker) missingMethodCause(V, T Type, m, alt *Func) string {
 
                altS, mS := check.funcString(alt, false), check.funcString(m, false)
                if altS == mS {
-                       // Would tell the user that Foo isn't a Foo, add package information to disambiguate.  See #54258.
+                       // Would tell the user that Foo isn't a Foo, add package information to disambiguate.
+                       // See go.dev/issue/54258.
                        altS, mS = check.funcString(alt, true), check.funcString(m, true)
                }
 
index 5986ec83a7cc7b1d89f623169eb22fa93d3a0776..8285f1b3d4f1a54da8e61e3a81f0cf7a86a2d501 100644 (file)
@@ -158,7 +158,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
                        } else if len(tparams) < len(recvTParams) {
                                // Reporting an error here is a stop-gap measure to avoid crashes in the
                                // compiler when a type parameter/argument cannot be inferred later. It
-                               // may lead to follow-on errors (see issues #51339, #51343).
+                               // may lead to follow-on errors (see issues go.dev/issue/51339, go.dev/issue/51343).
                                // TODO(gri) find a better solution
                                got := measure(len(tparams), "type parameter")
                                check.errorf(recvPar, BadRecv, "got %s, but receiver base type declares %d", got, len(recvTParams))
@@ -207,7 +207,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
                sig.recv = recv
 
                // Delay validation of receiver type as it may cause premature expansion
-               // of types the receiver type is dependent on (see issues #51232, #51233).
+               // of types the receiver type is dependent on (see issues go.dev/issue/51232, go.dev/issue/51233).
                check.later(func() {
                        // spec: "The receiver type must be of the form T or *T where T is a type name."
                        rtyp, _ := deref(recv.typ)
index afc413c914bf31df0e5fb979154351d1b6f8b207..f2290c572599f906700ac0d021cc622636fbc0ad 100644 (file)
@@ -192,7 +192,7 @@ func TestStdFixed(t *testing.T) {
                "issue22200b.go", // go/types does not have constraints on stack size
                "issue25507.go",  // go/types does not have constraints on stack size
                "issue20780.go",  // go/types does not have constraints on stack size
-               "bug251.go",      // go.dev/issue/34333 which was exposed with fix for #34151
+               "bug251.go",      // go.dev/issue/34333 which was exposed with fix for go.dev/issue/34151
                "issue42058a.go", // go/types does not have constraints on channel element size
                "issue42058b.go", // go/types does not have constraints on channel element size
                "issue48097.go",  // go/types doesn't check validity of //go:xxx directives, and non-init bodyless function
@@ -224,7 +224,7 @@ func TestStdKen(t *testing.T) {
 var excluded = map[string]bool{
        "builtin": true,
 
-       // See #46027: some imports are missing for this submodule.
+       // See go.dev/issue/46027: some imports are missing for this submodule.
        "crypto/internal/edwards25519/field/_asm": true,
        "crypto/internal/bigmod/_asm":             true,
 }
index a9b50035d7ede5ab5465c32f64900f9d206615a1..790daa3529795abbbff0287f5775816a97e6c671 100644 (file)
@@ -7,7 +7,7 @@
 // correctly with types2 at the moment. See go.dev/issue/52080.
 // Make sure we keep testing them with go/types.
 //
-// TODO(gri) Once #52080 is fixed, this file can be
+// TODO(gri) Once go.dev/issue/52080 is fixed, this file can be
 //           deleted in favor of the re-enabled tests
 //           in the shared file.
 
index 03c4739814f4a17062041146613d5567a08fcff3..8265aa82b42e74f214b42de9c29ba848f6c66ddd 100644 (file)
@@ -16,7 +16,7 @@ import (
 
 const (
        // Upper limit for recursion depth. Used to catch infinite recursions
-       // due to implementation issues (e.g., see issues #48619, #48656).
+       // due to implementation issues (e.g., see issues go.dev/issue/48619, go.dev/issue/48656).
        unificationDepthLimit = 50
 
        // Whether to panic when unificationDepthLimit is reached.