gopls/internal/test/marker/testdata/diagnostics/issue69505.txt
raw| 1 | This test checks that diagnostics ranges computed with the TypeErrorEndPos |
| 2 | heuristic span at least a full token. |
| 3 | |
| 4 | -- go.mod -- |
| 5 | module example.com |
| 6 | |
| 7 | go 1.21 |
| 8 | |
| 9 | -- main.go -- |
| 10 | package main |
| 11 | |
| 12 | import "example.com/foo-bar" //@ diag(re`"[^"]*"`, re`not used`, exact=true) |
| 13 | |
| 14 | func f(int) {} |
| 15 | |
| 16 | func main() { |
| 17 | var x int |
| 18 | _ = x + 1.e+0i //@ diag("1.e+0i", re`truncated`, exact=true) |
| 19 | } |
| 20 | |
| 21 | -- foo-bar/baz.go -- |
| 22 | package foo |