mirror of
https://github.com/golang/go
synced 2024-11-07 14:56:16 -07:00
2d34af0fd6
CL 367755 added soleComponent for handling 1-byte type interface conversion. This implementation must be kept in sync with Type.SoleComponent, but it does not. When seeing a blank field in struct, we must continue looking at the field type to find sole component, if any. The current code just terminate immediately, which causes wrong sole component type returned. Fixes #52020 Change-Id: I4f506fe094fa7c5532de23467a4f9139476bb0a4 Reviewed-on: https://go-review.googlesource.com/c/go/+/396614 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
12 lines
245 B
Go
12 lines
245 B
Go
// compile
|
|
|
|
// Copyright 2022 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 main
|
|
|
|
func main() {
|
|
var _ interface{} = struct{ _ [1]int8 }{}
|
|
}
|