aboutsummaryrefslogtreecommitdiffstats
path: root/testdata/simple.go
blob: 0a2f0af283ac174fc624dad721b089d52de35c5f (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
package main

import "strings"

func main() {
	capturedReference := 0
	capturedReference2 := 1
	copied := 0

	go func(copied int) {
		capturedReference += 1
		capturedReference2 += 1
		copied += 1

		if capturedReference == 1 {
			return
		}

		newVar := 0
		newVar += 1

		str := "a"
		strings.Repeat(str, 3)
	}(copied)
}