aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2023-01-31 14:59:19 -0800
committerGopher Robot <gobot@golang.org>2023-02-01 21:31:01 +0000
commit6d4de4e386cd9e4ec32937ab2d4f79317db461cd (patch)
tree643ba09b7805d38f04105cbd82a0bf3c4ff689ec /src/cmd/compile
parent07dca0fe14d717f7e44593d13d9a6767ec34a9cc (diff)
downloadgo-6d4de4e386cd9e4ec32937ab2d4f79317db461cd.tar.xz
go/types, types2: use go.dev/issue/nnnnn when referring to an issue (cleanup)
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>
Diffstat (limited to 'src/cmd/compile')
-rw-r--r--src/cmd/compile/internal/types2/decl.go2
-rw-r--r--src/cmd/compile/internal/types2/expr.go8
-rw-r--r--src/cmd/compile/internal/types2/infer.go2
-rw-r--r--src/cmd/compile/internal/types2/lookup.go3
-rw-r--r--src/cmd/compile/internal/types2/signature.go4
-rw-r--r--src/cmd/compile/internal/types2/stdlib_test.go2
-rw-r--r--src/cmd/compile/internal/types2/stmt.go2
-rw-r--r--src/cmd/compile/internal/types2/typexpr.go2
-rw-r--r--src/cmd/compile/internal/types2/unify.go2
9 files changed, 14 insertions, 13 deletions
diff --git a/src/cmd/compile/internal/types2/decl.go b/src/cmd/compile/internal/types2/decl.go
index 1544ee11f4..0ac0f6196a 100644
--- a/src/cmd/compile/internal/types2/decl.go
+++ b/src/cmd/compile/internal/types2/decl.go
@@ -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)
diff --git a/src/cmd/compile/internal/types2/expr.go b/src/cmd/compile/internal/types2/expr.go
index 472e30a069..0be2a4533c 100644
--- a/src/cmd/compile/internal/types2/expr.go
+++ b/src/cmd/compile/internal/types2/expr.go
@@ -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")
diff --git a/src/cmd/compile/internal/types2/infer.go b/src/cmd/compile/internal/types2/infer.go
index b9defb3e81..24213134f5 100644
--- a/src/cmd/compile/internal/types2/infer.go
+++ b/src/cmd/compile/internal/types2/infer.go
@@ -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
diff --git a/src/cmd/compile/internal/types2/lookup.go b/src/cmd/compile/internal/types2/lookup.go
index 96d87fe66a..0c3b96ff2d 100644
--- a/src/cmd/compile/internal/types2/lookup.go
+++ b/src/cmd/compile/internal/types2/lookup.go
@@ -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)
}
diff --git a/src/cmd/compile/internal/types2/signature.go b/src/cmd/compile/internal/types2/signature.go
index 61c6721f80..8e0dfe2881 100644
--- a/src/cmd/compile/internal/types2/signature.go
+++ b/src/cmd/compile/internal/types2/signature.go
@@ -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)
diff --git a/src/cmd/compile/internal/types2/stdlib_test.go b/src/cmd/compile/internal/types2/stdlib_test.go
index 28df06c989..c5903a12d3 100644
--- a/src/cmd/compile/internal/types2/stdlib_test.go
+++ b/src/cmd/compile/internal/types2/stdlib_test.go
@@ -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,
}
diff --git a/src/cmd/compile/internal/types2/stmt.go b/src/cmd/compile/internal/types2/stmt.go
index 1ddaef39ab..f87ef11b98 100644
--- a/src/cmd/compile/internal/types2/stmt.go
+++ b/src/cmd/compile/internal/types2/stmt.go
@@ -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])
diff --git a/src/cmd/compile/internal/types2/typexpr.go b/src/cmd/compile/internal/types2/typexpr.go
index cddc7f070b..9fe9c17803 100644
--- a/src/cmd/compile/internal/types2/typexpr.go
+++ b/src/cmd/compile/internal/types2/typexpr.go
@@ -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]
}
diff --git a/src/cmd/compile/internal/types2/unify.go b/src/cmd/compile/internal/types2/unify.go
index bdafdf9c6a..aff8a147e4 100644
--- a/src/cmd/compile/internal/types2/unify.go
+++ b/src/cmd/compile/internal/types2/unify.go
@@ -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.