1// compile 2 3// Copyright 2022 The Go Authors. All rights reserved. 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file. 6 7// Issue 52870: gofrontend gave incorrect error when incorrectly 8// compiling ambiguous promoted method. 9 10package p 11 12type S1 struct { 13 *S2 14} 15 16type S2 struct { 17 T3 18 T4 19} 20 21type T3 int32 22 23func (T3) M() {} 24 25type T4 int32 26 27func (T4) M() {} 28