mirror of
https://github.com/golang/go
synced 2024-11-12 07:10:22 -07:00
099b819085
Because the Align/Width of pointer types are always set when created, CalcSize() never descends past a pointer. Therefore, we need to do CheckSize() at every level when creating type. We need to do this for types creates by types2-to-types1 conversion and also by type substitution (mostly for stenciling). We also need to do Defer/ResumeCheckSize() at the top level in each of these cases to deal with potentially recursive types. These changes fix issue #47929 and also allow us to remove the special-case CheckSize() call that causes the problem for issue #47901. Fixes #47901 Fixes #47929 Change-Id: Icd8192431c145009cd6df2f4ade6db7da0f4dd3e Reviewed-on: https://go-review.googlesource.com/c/go/+/344829 Trust: Dan Scales <danscales@google.com> Reviewed-by: Keith Randall <khr@golang.org>
30 lines
535 B
Go
30 lines
535 B
Go
// compile -G=3 -p=p
|
|
|
|
// Copyright 2021 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package v4
|
|
|
|
var sink interface{}
|
|
|
|
//go:noinline
|
|
func Do(result, body interface{}) {
|
|
sink = &result
|
|
}
|
|
|
|
func DataAction(result DataActionResponse, body DataActionRequest) {
|
|
Do(&result, body)
|
|
}
|
|
|
|
type DataActionRequest struct {
|
|
Action *interface{}
|
|
}
|
|
|
|
type DataActionResponse struct {
|
|
ValidationErrors *ValidationError
|
|
}
|
|
|
|
type ValidationError struct {
|
|
}
|