cmd/compile: fix typos in types2 api_test.go

Change-Id: Ifee1b0f590ebb6671efd61a289c8884a225f5d6b
GitHub-Last-Rev: 175ae95847
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>
This commit is contained in:
goto1134
2025-12-10 17:52:23 +00:00
committed by Gopher Robot
parent d774ced6a9
commit b291c3c35c

View File

@@ -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 {