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
5// Test cases for sort order of declarations.
6
7package d
8
9// C1 should be second.
10const C1 = 1
11
12// C0 should be first.
13const C0 = 0
14
15// V1 should be second.
16var V1 uint
17
18// V0 should be first.
19var V0 uintptr
20
21// CAx constants should appear after CBx constants.
22const (
23	CA2 = iota // before CA1
24	CA1        // before CA0
25	CA0        // at end
26)
27
28// VAx variables should appear after VBx variables.
29var (
30	VA2 int // before VA1
31	VA1 int // before VA0
32	VA0 int // at end
33)
34
35// T1 should be second.
36type T1 struct{}
37
38// T0 should be first.
39type T0 struct{}
40
41// F1 should be second.
42func F1() {}
43
44// F0 should be first.
45func F0() {}
46