1// compile
2
3// Copyright 2016 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 13337: The Go compiler limited how deeply embedded types
8// were searched for promoted fields and methods.
9
10package s
11
12type S0 struct{ f int }
13func (S0) m() {}
14
15type S1 struct{ S0 }
16type S2 struct{ S1 }
17type S3 struct{ S2 }
18type S4 struct{ S3 }
19type S5 struct{ S4 }
20type S6 struct{ S5 }
21type S7 struct{ S6 }
22type S8 struct{ S7 }
23type S9 struct{ S8 }
24type S10 struct{ S9 }
25type S11 struct{ S10 }
26type S12 struct{ S11 }
27type S13 struct{ S12 }
28
29var _ = S13{}.f
30var _ = S13.m
31