1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:06:13 -07:00
go/cmd/cover/testdata
Rob Pike 65b5a8eca7 cmd/cover: cover funcs in if, for, switch clauses
This peculiar case arose in range statements but there are other contexts
and one turned up in the auto-generated translation of the compiler.
Take care of it always.

	for i := 0; i < 0; func() {i++; q=q.Link}() { ... }

That code has been given the obvious rewrite but we should still handle it.

Odd but easy to fix (tricky to test).

Fixes #10269.

Change-Id: I66e1404eb24da15a24be7f67403e19ed66fba0a7
Reviewed-on: https://go-review.googlesource.com/8284
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-03-31 19:20:52 +00:00
..
main.go cmd/cover: do not cover statements after panic 2015-03-27 17:59:54 +00:00
test.go cmd/cover: cover funcs in if, for, switch clauses 2015-03-31 19:20:52 +00:00