diff --git a/src/cmd/compile/internal/gc/abiutilsaux_test.go b/src/cmd/compile/internal/gc/abiutilsaux_test.go index d90d1d45a05..5489a512d26 100644 --- a/src/cmd/compile/internal/gc/abiutilsaux_test.go +++ b/src/cmd/compile/internal/gc/abiutilsaux_test.go @@ -75,10 +75,7 @@ func tokenize(src string) []string { } func verifyParamResultOffset(t *testing.T, f *types.Field, r ABIParamAssignment, which string, idx int) int { - n := ir.AsNode(f.Nname) - if n == nil { - panic("not expected") - } + n := ir.AsNode(f.Nname).(*ir.Name) if n.Offset() != int64(r.Offset) { t.Errorf("%s %d: got offset %d wanted %d t=%v", which, idx, r.Offset, n.Offset(), f.Type)