1// Copyright 2012 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package c
6
7import "a"
8
9// ----------------------------------------------------------------------------
10// Test that empty declarations don't cause problems
11
12const ()
13
14type ()
15
16var ()
17
18// ----------------------------------------------------------------------------
19// Test that types with documentation on both, the Decl and the Spec node
20// are handled correctly.
21
22// A (should see this)
23type A struct{}
24
25// B (should see this)
26type (
27	B struct{}
28)
29
30type (
31	// C (should see this)
32	C struct{}
33)
34
35// D (should not see this)
36type (
37	// D (should see this)
38	D struct{}
39)
40
41// E (should see this for E2 and E3)
42type (
43	// E1 (should see this)
44	E1 struct{}
45	E2 struct{}
46	E3 struct{}
47	// E4 (should see this)
48	E4 struct{}
49)
50
51// ----------------------------------------------------------------------------
52// Test that local and imported types are different when
53// handling anonymous fields.
54
55type T1 struct{}
56
57func (t1 *T1) M() {}
58
59// T2 must not show methods of local T1
60type T2 struct {
61	a.T1 // not the same as locally declared T1
62}
63