test/goroot: match missing-comma recovery diagnostics - #2218
Conversation
There was a problem hiding this comment.
Review: test/goroot: match missing-comma recovery diagnostics
Reviewed the diff across code quality, performance, security, and documentation accuracy.
Clean, well-scoped change. The two new parserRecoverySecondaries cases (composite literal, parameter list) follow the existing pairing convention exactly: a secondary is discarded only after its gc-style primary matched on the same file+line with exact secondary text, and parserRecoveryPair.consumed ensures only one duplicate is dropped. The comment reword (dropping "the five") is a correct fix now that the switch handles more spellings. No performance, security, or documentation-accuracy concerns.
Two minor test-quality notes are inline. Neither is a correctness bug — the harness pairing logic is exercised correctly and the PR reports validation of both enabled cases across Go 1.24.11 / 1.25.0 / 1.26.0 / 1.26.5.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
66e8e27 to
d87434b
Compare
Summary
fixedbugs/issue14520.goandsyntax/composite.goin Go 1.26 errorcheck coverageCorrectness
The secondary is discarded only after the expected primary matched. A secondary by itself, a near-match, a different source/line, or an extra duplicate remains an error.
Validation
go test ./test/gorootScope and overlap
No functional dependency on another PR. This does not touch
interface/assertinline.go, which is handled by #2201, and does not include wasm or DWARF changes.The Ubuntu Go workflow currently needs #2215 to install
libslirp.so.0for ESP QEMU verification. This PR does not duplicate that CI fix.The seven compile xfails remain intentionally unchanged: their
checkptr,libfuzzer,softfloat, anddynlinkflags carry compiler semantics and should not be accepted as no-ops.