1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:14:46 -07:00
go/cmd/cover
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
..
testdata cmd/cover: cover funcs in if, for, switch clauses 2015-03-31 19:20:52 +00:00
cover_test.go go.tools/cmd/cover: fix build 2013-06-21 14:47:04 -07:00
cover.go cmd/cover: cover funcs in if, for, switch clauses 2015-03-31 19:20:52 +00:00
doc.go tools: add import comments. 2014-12-09 22:42:16 +00:00
func.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00
html.go go.tools: use golang.org/x/... import paths 2014-11-10 08:50:40 +11:00