gopls/internal/test/marker/testdata/diagnostics/issue64547.txt
raw| 1 | This test checks the fix for golang/go#64547: the lostcancel analyzer reports |
| 2 | diagnostics that overflow the file. |
| 3 | |
| 4 | -- p.go -- |
| 5 | package p |
| 6 | |
| 7 | import "context" |
| 8 | |
| 9 | func _() { |
| 10 | _, cancel := context.WithCancel(context.Background()) //@diag("_, cancel", re"not used on all paths") |
| 11 | if false { |
| 12 | cancel() |
| 13 | } |
| 14 | } //@diag("}", re"may be reached without using the cancel") |