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 b 6 7import "a" 8 9// ---------------------------------------------------------------------------- 10// Basic declarations 11 12const Pi = 3.14 // Pi 13var MaxInt int // MaxInt 14type T struct{} // T 15var V T // v 16func F(x int) int {} // F 17func (x *T) M() {} // M 18 19// Corner cases: association with (presumed) predeclared types 20 21// Always under the package functions list. 22func NotAFactory() int {} 23 24// Associated with uint type if AllDecls is set. 25func UintFactory() uint {} 26 27// Associated with uint type if AllDecls is set. 28func uintFactory() uint {} 29 30// Should only appear if AllDecls is set. 31type uint struct{} // overrides a predeclared type uint 32 33// ---------------------------------------------------------------------------- 34// Exported declarations associated with non-exported types must always be shown. 35 36type notExported int 37 38const C notExported = 0 39 40const ( 41 C1 notExported = iota 42 C2 43 c3 44 C4 45 C5 46) 47 48var V notExported 49var V1, V2, v3, V4, V5 notExported 50 51var ( 52 U1, U2, u3, U4, U5 notExported 53 u6 notExported 54 U7 notExported = 7 55) 56 57func F1() notExported {} 58func f2() notExported {} 59