summaryrefslogtreecommitdiffstats
path: root/src/cmd/cover/testdata/pkgcfg/a/a.go
blob: 44c380b37930c4d3f05158536ec65728adf80b73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package a

type Atyp int

func (ap *Atyp) Set(q int) {
	*ap = Atyp(q)
}

func (ap Atyp) Get() int {
	inter := func(q Atyp) int {
		return int(q)
	}
	return inter(ap)
}

var afunc = func(x int) int {
	return x + 1
}
var Avar = afunc(42)

func A(x int) int {
	if x == 0 {
		return 22
	} else if x == 1 {
		return 33
	}
	return 44
}