mirror of
https://github.com/golang/go
synced 2024-11-05 15:56:12 -07:00
9ff91b9098
CL 356254 fixed crawling of embeddable types during inline. However, we are too agressive, since when we call markEmbed for every type seen during inlining function body. That leads to false positive that for a non-embedded type, its unexported methods are also marked inline. Instead, we should only look at struct type that we seen during inlining function body, and calling markEmbed for all of its embedded fields. Fixes #49094 Change-Id: I6ef9a8bf1fc649ec6bf75e4883f6031ec8560ba1 Reviewed-on: https://go-review.googlesource.com/c/go/+/357232 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
16 lines
234 B
Go
16 lines
234 B
Go
// 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 p
|
|
|
|
import (
|
|
"./b"
|
|
)
|
|
|
|
type S struct{}
|
|
|
|
func (S) M() {
|
|
b.M(nil)
|
|
}
|