]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix typos in types2 api_test.go
authorgoto1134 <1134togo@gmail.com>
Wed, 10 Dec 2025 17:52:23 +0000 (17:52 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 23 Jan 2026 17:46:43 +0000 (09:46 -0800)
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>
src/cmd/compile/internal/types2/api_test.go

index a3bb08531797d50c7cbfa8f3c81901379b1a7ff5..3461190589facbbced95f560e7f4e286c3c2bb1c 100644 (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 {