aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile
diff options
context:
space:
mode:
authorgoto1134 <1134togo@gmail.com>2025-12-10 17:52:23 +0000
committerGopher Robot <gobot@golang.org>2026-01-23 09:46:43 -0800
commitb291c3c35c41ddd2db75c3b3ce8ae476fe11ea7b (patch)
treea8caa9fcf3414de46799b0a77731182997428cbc /src/cmd/compile
parentd774ced6a97d3e354d92e874861fb24d7527e3cb (diff)
downloadgo-b291c3c35c41ddd2db75c3b3ce8ae476fe11ea7b.tar.xz
cmd/compile: fix typos in types2 api_test.go
Change-Id: Ifee1b0f590ebb6671efd61a289c8884a225f5d6b GitHub-Last-Rev: 175ae95847b0108949459b881c2cd2144e74353e GitHub-Pull-Request: golang/go#76782 Reviewed-on: https://go-review.googlesource.com/c/go/+/728980 Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/cmd/compile')
-rw-r--r--src/cmd/compile/internal/types2/api_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/types2/api_test.go b/src/cmd/compile/internal/types2/api_test.go
index a3bb085317..3461190589 100644
--- a/src/cmd/compile/internal/types2/api_test.go
+++ b/src/cmd/compile/internal/types2/api_test.go
@@ -1015,13 +1015,13 @@ func (r *N[C]) n() { }
t.Errorf(`N.Method(...) returns %v for "m", but Info.Defs has %v`, gm, dm)
}
if gn != dn {
- t.Errorf(`N.Method(...) returns %v for "m", but Info.Defs has %v`, gm, dm)
+ t.Errorf(`N.Method(...) returns %v for "n", but Info.Defs has %v`, gn, dn)
}
if dmm != dm {
t.Errorf(`Inside "m", r.m uses %v, want the defined func %v`, dmm, dm)
}
if dmn == dn {
- t.Errorf(`Inside "m", r.n uses %v, want a func distinct from %v`, dmm, dm)
+ t.Errorf(`Inside "m", r.n uses %v, want a func distinct from %v`, dmn, dn)
}
}
@@ -1225,9 +1225,9 @@ func TestPredicatesInfo(t *testing.T) {
{`package v0; var (a, b int; _ = a + b)`, `a + b`, `value`},
{`package v1; var _ = &[]int{1}`, `[]int{…}`, `value`},
{`package v2; var _ = func(){}`, `func() {}`, `value`},
- {`package v4; func f() { _ = f }`, `f`, `value`},
- {`package v3; var _ *int = nil`, `nil`, `value, nil`},
- {`package v3; var _ *int = (nil)`, `(nil)`, `value, nil`},
+ {`package v3; func f() { _ = f }`, `f`, `value`},
+ {`package v4; var _ *int = nil`, `nil`, `value, nil`},
+ {`package v5; var _ *int = (nil)`, `(nil)`, `value, nil`},
// addressable (and thus assignable) operands
{`package a0; var (x int; _ = x)`, `x`, `value, addressable, assignable`},
@@ -1258,8 +1258,8 @@ func TestPredicatesInfo(t *testing.T) {
{`package m4; var v int`, `v`, `<missing>`},
{`package m5; func f() {}`, `f`, `<missing>`},
{`package m6; func _(x int) {}`, `x`, `<missing>`},
- {`package m6; func _()(x int) { return }`, `x`, `<missing>`},
- {`package m6; type T int; func (x T) _() {}`, `x`, `<missing>`},
+ {`package m7; func _()(x int) { return }`, `x`, `<missing>`},
+ {`package m8; type T int; func (x T) _() {}`, `x`, `<missing>`},
}
for _, test := range tests {