]> Cypherpunks repositories - gostls13.git/commit
go/types: improve the positioning of broken import errors
authorRob Findley <rfindley@google.com>
Tue, 9 Mar 2021 19:22:38 +0000 (14:22 -0500)
committerRobert Findley <rfindley@google.com>
Tue, 9 Mar 2021 22:00:50 +0000 (22:00 +0000)
commit142a76530cf610fe02d151727fa0d8038c552127
tree7c6824bb4088c7d75e0ca38bd97d0fe2f30ccf39
parent48ddf7012875014d3cab4a02002799a520b087a1
go/types: improve the positioning of broken import errors

The heuristic gopls uses to guess error spans can get tripped-up on
certain valid characters in an import path (for example '-').

Update the error for broken imports to capture the full import path
span, so that gopls doesn't need to rely on heuristics.

Change-Id: Ieb8e0dce11933643f701b32271ff5f3477fecaaa
Reviewed-on: https://go-review.googlesource.com/c/go/+/300169
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/resolver.go