mirror of https://github.com/golang/go.git
CL 405546 introduced a latent bug in MappedRange, because it naively used the wrong TokenConverter to convert mapped positions to offsets. This was detected via related clean-up work in another CL. Fix this by passing the correct converter from MappedRange.Range. Add a test that would have demonstrated the breakage. More cleanup is needed here. It is subtle that MappedRange.Converter maps the adjusted position for its start and end, and there may be some places where this invariant has been broken over the years. Add additional documentation and bug reports. Change-Id: If7f177894bac1242ddcc1786e79c7559455e9291 Reviewed-on: https://go-review.googlesource.com/c/tools/+/407887 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> |
||
|---|---|---|
| .. | ||
| parse.go | ||
| span.go | ||
| span_test.go | ||
| token.go | ||
| token_test.go | ||
| uri.go | ||
| uri_test.go | ||
| uri_windows_test.go | ||
| utf16.go | ||
| utf16_test.go | ||