Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
This seems to be the same as #27350 but still happens even after running
What version of Go are you using (
The problem seems to be that the cover tool assumes that all lines in a single input file correspond to a single input file. In this case the input file datemath.y.go is composed of different input files. The coverage tool is assigning some coverage information to line 89 of datemath.y and some to line 89 of yaccpar. The first problem is that the coverage information for those two different lines is being mixed together. The second more immediate problem is that line 89 of yaccpar is a for statement with multiple statements on the line, and line 89 of datemath.y is not. That causes the cover tool to report an inconsistency.
I think the correct fix has to involve somehow making the cover tool aware of multiple source files within a single input file. Or, alternatively, entirely ignoring