Skip to content

Commit 30f6358

Browse files
committed
add tested example file for GO jump rewriting
1 parent e1dc829 commit 30f6358

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/golang/labels.go

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package labels
2+
3+
var N int
4+
5+
func Closures() {
6+
if N != 1 {
7+
go func() {
8+
myFunc := func() {
9+
if N != 4 {
10+
print(1)
11+
}
12+
}
13+
14+
if N != 3 {
15+
myFunc()
16+
}
17+
}()
18+
}
19+
}
20+
21+
func Closures_func1_1() {
22+
if N != 1 {
23+
print(1)
24+
}
25+
}
26+
27+
func αβ() {
28+
if N != 1 {
29+
print(1)
30+
}
31+
}

0 commit comments

Comments
 (0)