Skip to content

Commit b08c735

Browse files
committed
tests: add tests about closure of closure
1 parent 3cc6ce5 commit b08c735

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

testdata/src/a/a.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,11 @@ func f16(ctx context.Context, k string) func() {
163163
f16(context.Background(), k)
164164
}
165165
}
166+
167+
func f17(ctx context.Context, k string) func() func() {
168+
return func() func() { // want "Function `f17\\$1->f17\\$1\\$1` should pass the context parameter"
169+
return func() {
170+
f16(context.Background(), k)
171+
}
172+
}
173+
}

0 commit comments

Comments
 (0)