1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 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.
9 type S1 struct { i int }
12 typ := reflect.Typeof(S2{}).(*reflect.StructType);
14 if f.Name != "S1" || f.Anonymous != true {
15 println("BUG: ", f.Name, f.Anonymous);
18 f, ok := typ.FieldByName("S1");
20 println("BUG: missing S1");
24 println("BUG: S1 is not anonymous");