Skip to content

Commit 6d4de4e

Browse files
griesemergopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]>
1 parent 07dca0f commit 6d4de4e

18 files changed

+31
-29
lines changed

src/cmd/compile/internal/types2/decl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ func (check *Checker) constDecl(obj *Const, typ, init syntax.Expr, inherited boo
405405
// expression and not the current constant declaration. Use
406406
// the constant identifier position for any errors during
407407
// init expression evaluation since that is all we have
408-
// (see issues #42991, #42992).
408+
// (see issues go.dev/issue/42991, go.dev/issue/42992).
409409
check.errpos = obj.pos
410410
}
411411
check.expr(&x, init)

src/cmd/compile/internal/types2/expr.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ func (check *Checker) shift(x, y *operand, e syntax.Expr, op syntax.Operator) {
960960

961961
if isUntyped(y.typ) {
962962
// Caution: Check for representability here, rather than in the switch
963-
// below, because isInteger includes untyped integers (was bug #43697).
963+
// below, because isInteger includes untyped integers (was bug go.dev/issue/43697).
964964
check.representable(y, Typ[Uint])
965965
if y.mode == invalid {
966966
x.mode = invalid
@@ -978,7 +978,7 @@ func (check *Checker) shift(x, y *operand, e syntax.Expr, op syntax.Operator) {
978978
}
979979
case isUntyped(y.typ):
980980
// This is incorrect, but preserves pre-existing behavior.
981-
// See also bug #47410.
981+
// See also go.dev/issue/47410.
982982
check.convertUntyped(y, Typ[Uint])
983983
if y.mode == invalid {
984984
x.mode = invalid
@@ -1355,11 +1355,11 @@ func (check *Checker) exprInternal(x *operand, e syntax.Expr, hint Type) exprKin
13551355
// init expression/func declaration which contains
13561356
// them: use existing package-level declaration info.
13571357
decl := check.decl // capture for use in closure below
1358-
iota := check.iota // capture for use in closure below (#22345)
1358+
iota := check.iota // capture for use in closure below (go.dev/issue/22345)
13591359
// Don't type-check right away because the function may
13601360
// be part of a type definition to which the function
13611361
// body refers. Instead, type-check as soon as possible,
1362-
// but before the enclosing scope contents changes (#22992).
1362+
// but before the enclosing scope contents changes (go.dev/issue/22992).
13631363
check.later(func() {
13641364
check.funcBody(decl, "<function literal>", sig, e.Body, iota)
13651365
}).describef(e, "func literal")

src/cmd/compile/internal/types2/infer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ func (check *Checker) inferB(tparams []*TypeParam, targs []Type) (types []Type,
505505
// For instance, given [P T1|T2, ...] where the type argument for P is (named
506506
// type) T1, and T1 and T2 have the same built-in (named) type T0 as underlying
507507
// type, the core type will be the named type T0, which doesn't match T1.
508-
// Yet the instantiation of P with T1 is clearly valid (see #53650).
508+
// Yet the instantiation of P with T1 is clearly valid (see go.dev/issue/53650).
509509
// Reporting an error if unification fails would be incorrect in this case.
510510
// On the other hand, it is safe to ignore failing unification during constraint
511511
// type inference because if the failure is true, an error will be reported when

src/cmd/compile/internal/types2/lookup.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@ func (check *Checker) missingMethodCause(V, T Type, m, alt *Func) string {
399399

400400
altS, mS := check.funcString(alt, false), check.funcString(m, false)
401401
if altS == mS {
402-
// Would tell the user that Foo isn't a Foo, add package information to disambiguate. See #54258.
402+
// Would tell the user that Foo isn't a Foo, add package information to disambiguate.
403+
// See go.dev/issue/54258.
403404
altS, mS = check.funcString(alt, true), check.funcString(m, true)
404405
}
405406

src/cmd/compile/internal/types2/signature.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *syntax.Field, tparams []
154154
} else if len(tparams) < len(recvTParams) {
155155
// Reporting an error here is a stop-gap measure to avoid crashes in the
156156
// compiler when a type parameter/argument cannot be inferred later. It
157-
// may lead to follow-on errors (see issues #51339, #51343).
157+
// may lead to follow-on errors (see issues go.dev/issue/51339, go.dev/issue/51343).
158158
// TODO(gri) find a better solution
159159
got := measure(len(tparams), "type parameter")
160160
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 []
204204
sig.recv = recv
205205

206206
// Delay validation of receiver type as it may cause premature expansion
207-
// of types the receiver type is dependent on (see issues #51232, #51233).
207+
// of types the receiver type is dependent on (see issues go.dev/issue/51232, go.dev/issue/51233).
208208
check.later(func() {
209209
// spec: "The receiver type must be of the form T or *T where T is a type name."
210210
rtyp, _ := deref(recv.typ)

src/cmd/compile/internal/types2/stdlib_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func TestStdKen(t *testing.T) {
222222
var excluded = map[string]bool{
223223
"builtin": true,
224224

225-
// See #46027: some imports are missing for this submodule.
225+
// go.dev/issue/46027: some imports are missing for this submodule.
226226
"crypto/internal/edwards25519/field/_asm": true,
227227
"crypto/internal/bigmod/_asm": true,
228228
}

src/cmd/compile/internal/types2/stmt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ func (check *Checker) typeSwitchStmt(inner stmtContext, s *syntax.SwitchStmt, gu
796796
}
797797
obj := NewVar(lhs.Pos(), check.pkg, lhs.Value, T)
798798
// TODO(mdempsky): Just use clause.Colon? Why did I even suggest
799-
// "at the end of the TypeSwitchCase" in #16794 instead?
799+
// "at the end of the TypeSwitchCase" in go.dev/issue/16794 instead?
800800
scopePos := clause.Pos() // for default clause (len(List) == 0)
801801
if n := len(cases); n > 0 {
802802
scopePos = syntax.EndPos(cases[n-1])

src/cmd/compile/internal/types2/typexpr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func (check *Checker) typInternal(e0 syntax.Expr, def *Named) (T Type) {
325325
// If typ.base is invalid, it's unlikely that *base is particularly
326326
// useful - even a valid dereferenciation will lead to an invalid
327327
// type again, and in some cases we get unexpected follow-on errors
328-
// (e.g., see #49005). Return an invalid type instead.
328+
// (e.g., go.dev/issue/49005). Return an invalid type instead.
329329
if typ.base == Typ[Invalid] {
330330
return Typ[Invalid]
331331
}

src/cmd/compile/internal/types2/unify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
const (
1616
// Upper limit for recursion depth. Used to catch infinite recursions
17-
// due to implementation issues (e.g., see issues #48619, #48656).
17+
// due to implementation issues (e.g., see issues go.dev/issue/48619, go.dev/issue/48656).
1818
unificationDepthLimit = 50
1919

2020
// Whether to panic when unificationDepthLimit is reached.

src/go/types/builtins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ func (check *Checker) applyTypeFunc(f func(Type) Type, x *operand, id builtinId)
946946

947947
// We can type-check this fine but we're introducing a synthetic
948948
// type parameter for the result. It's not clear what the API
949-
// implications are here. Report an error for 1.18 (see #50912),
949+
// implications are here. Report an error for 1.18 (see go.dev/issue/50912),
950950
// but continue type-checking.
951951
var code Code
952952
switch id {

src/go/types/decl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ func (check *Checker) constDecl(obj *Const, typ, init ast.Expr, inherited bool)
474474
// expression and not the current constant declaration. Use
475475
// the constant identifier position for any errors during
476476
// init expression evaluation since that is all we have
477-
// (see issues #42991, #42992).
477+
// (see issues go.dev/issue/42991, go.dev/issue/42992).
478478
check.errpos = atPos(obj.pos)
479479
}
480480
check.expr(&x, init)

src/go/types/expr.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, const
695695
if !hasNil(target) {
696696
return nil, nil, InvalidUntypedConversion
697697
}
698-
// Preserve the type of nil as UntypedNil: see #13061.
698+
// Preserve the type of nil as UntypedNil: see go.dev/issue/13061.
699699
return Typ[UntypedNil], nil, 0
700700
default:
701701
return nil, nil, InvalidUntypedConversion
@@ -711,7 +711,7 @@ func (check *Checker) implicitTypeAndValue(x *operand, target Type) (Type, const
711711
}) {
712712
return nil, nil, InvalidUntypedConversion
713713
}
714-
// keep nil untyped (was bug #39755)
714+
// keep nil untyped (was bug go.dev/issue/39755)
715715
if x.isNil() {
716716
return Typ[UntypedNil], nil, 0
717717
}
@@ -938,7 +938,7 @@ func (check *Checker) shift(x, y *operand, e ast.Expr, op token.Token) {
938938

939939
if isUntyped(y.typ) {
940940
// Caution: Check for representability here, rather than in the switch
941-
// below, because isInteger includes untyped integers (was bug #43697).
941+
// below, because isInteger includes untyped integers (was bug go.dev/issue/43697).
942942
check.representable(y, Typ[Uint])
943943
if y.mode == invalid {
944944
x.mode = invalid
@@ -956,7 +956,7 @@ func (check *Checker) shift(x, y *operand, e ast.Expr, op token.Token) {
956956
}
957957
case isUntyped(y.typ):
958958
// This is incorrect, but preserves pre-existing behavior.
959-
// See also bug #47410.
959+
// See also go.dev/issue/47410.
960960
check.convertUntyped(y, Typ[Uint])
961961
if y.mode == invalid {
962962
x.mode = invalid
@@ -1333,11 +1333,11 @@ func (check *Checker) exprInternal(x *operand, e ast.Expr, hint Type) exprKind {
13331333
// init expression/func declaration which contains
13341334
// them: use existing package-level declaration info.
13351335
decl := check.decl // capture for use in closure below
1336-
iota := check.iota // capture for use in closure below (#22345)
1336+
iota := check.iota // capture for use in closure below (go.dev/issue/22345)
13371337
// Don't type-check right away because the function may
13381338
// be part of a type definition to which the function
13391339
// body refers. Instead, type-check as soon as possible,
1340-
// but before the enclosing scope contents changes (#22992).
1340+
// but before the enclosing scope contents changes (go.dev/issue/22992).
13411341
check.later(func() {
13421342
check.funcBody(decl, "<function literal>", sig, e.Body, iota)
13431343
}).describef(e, "func literal")

src/go/types/infer.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/go/types/lookup.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/go/types/signature.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
158158
} else if len(tparams) < len(recvTParams) {
159159
// Reporting an error here is a stop-gap measure to avoid crashes in the
160160
// compiler when a type parameter/argument cannot be inferred later. It
161-
// may lead to follow-on errors (see issues #51339, #51343).
161+
// may lead to follow-on errors (see issues go.dev/issue/51339, go.dev/issue/51343).
162162
// TODO(gri) find a better solution
163163
got := measure(len(tparams), "type parameter")
164164
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
207207
sig.recv = recv
208208

209209
// Delay validation of receiver type as it may cause premature expansion
210-
// of types the receiver type is dependent on (see issues #51232, #51233).
210+
// of types the receiver type is dependent on (see issues go.dev/issue/51232, go.dev/issue/51233).
211211
check.later(func() {
212212
// spec: "The receiver type must be of the form T or *T where T is a type name."
213213
rtyp, _ := deref(recv.typ)

src/go/types/stdlib_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func TestStdFixed(t *testing.T) {
192192
"issue22200b.go", // go/types does not have constraints on stack size
193193
"issue25507.go", // go/types does not have constraints on stack size
194194
"issue20780.go", // go/types does not have constraints on stack size
195-
"bug251.go", // go.dev/issue/34333 which was exposed with fix for #34151
195+
"bug251.go", // go.dev/issue/34333 which was exposed with fix for go.dev/issue/34151
196196
"issue42058a.go", // go/types does not have constraints on channel element size
197197
"issue42058b.go", // go/types does not have constraints on channel element size
198198
"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) {
224224
var excluded = map[string]bool{
225225
"builtin": true,
226226

227-
// See #46027: some imports are missing for this submodule.
227+
// See go.dev/issue/46027: some imports are missing for this submodule.
228228
"crypto/internal/edwards25519/field/_asm": true,
229229
"crypto/internal/bigmod/_asm": true,
230230
}

src/go/types/testdata/local/shifts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// correctly with types2 at the moment. See go.dev/issue/52080.
88
// Make sure we keep testing them with go/types.
99
//
10-
// TODO(gri) Once #52080 is fixed, this file can be
10+
// TODO(gri) Once go.dev/issue/52080 is fixed, this file can be
1111
// deleted in favor of the re-enabled tests
1212
// in the shared file.
1313

src/go/types/unify.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)