aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-06-28 10:57:26 -0700
committerDan Scales <danscales@google.com>2021-06-29 01:28:07 +0000
commitdfa8fd861ca99614f03ce409584c4f9ea3e6a3da (patch)
treee00f233a6bd020eda4e7d29415b68d2175d729d8 /src/cmd
parent64e6c75924a57306d8009cef4802b0b9ca4b7891 (diff)
downloadgo-dfa8fd861ca99614f03ce409584c4f9ea3e6a3da.tar.xz
[dev.typeparams] cmd/compile: add a field (method) name for function in TestABIUtilsInterfaces
Not having a field name for the method is not really correct, and makes it look like an embedded field. In fact, currently types.CalcSize() in abitest() is creating an error that is not actually reported. Change-Id: I98c3a4abf5b6d610d9c3c56ce1042078374b5417 Reviewed-on: https://go-review.googlesource.com/c/go/+/331469 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Dan Scales <danscales@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/test/abiutils_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/test/abiutils_test.go b/src/cmd/compile/internal/test/abiutils_test.go
index b752c48612..b7901be69b 100644
--- a/src/cmd/compile/internal/test/abiutils_test.go
+++ b/src/cmd/compile/internal/test/abiutils_test.go
@@ -310,7 +310,7 @@ func TestABIUtilsInterfaces(t *testing.T) {
pei := types.NewPtr(ei) // *interface{}
fldt := mkFuncType(types.FakeRecvType(), []*types.Type{},
[]*types.Type{types.UntypedString})
- field := types.NewField(src.NoXPos, nil, fldt)
+ field := types.NewField(src.NoXPos, typecheck.Lookup("f"), fldt)
nei := types.NewInterface(types.LocalPkg, []*types.Field{field})
i16 := types.Types[types.TINT16]
tb := types.Types[types.TBOOL]
@@ -322,12 +322,12 @@ func TestABIUtilsInterfaces(t *testing.T) {
IN 0: R{ I0 I1 I2 } spilloffset: 0 typ: struct { int16; int16; bool }
IN 1: R{ I3 I4 } spilloffset: 8 typ: interface {}
IN 2: R{ I5 I6 } spilloffset: 24 typ: interface {}
- IN 3: R{ I7 I8 } spilloffset: 40 typ: interface { () untyped string }
+ IN 3: R{ I7 I8 } spilloffset: 40 typ: interface { .f() untyped string }
IN 4: R{ } offset: 0 typ: *interface {}
- IN 5: R{ } offset: 8 typ: interface { () untyped string }
+ IN 5: R{ } offset: 8 typ: interface { .f() untyped string }
IN 6: R{ } offset: 24 typ: int16
OUT 0: R{ I0 I1 } spilloffset: -1 typ: interface {}
- OUT 1: R{ I2 I3 } spilloffset: -1 typ: interface { () untyped string }
+ OUT 1: R{ I2 I3 } spilloffset: -1 typ: interface { .f() untyped string }
OUT 2: R{ I4 } spilloffset: -1 typ: *interface {}
offsetToSpillArea: 32 spillAreaSize: 56
`)