gopls/internal/test/marker/testdata/callhierarchy/issue75230.txt
raw| 1 | Regression test for a crash (golang/go#75230) in outgoing calls |
| 2 | to a built-in method (error.Error). |
| 3 | |
| 4 | We (arbitrarily) don't show calls to built-ins without a package, |
| 5 | such as error.Error, hence the empty result asserted below. |
| 6 | |
| 7 | -- go.mod -- |
| 8 | module example.com |
| 9 | go 1.17 |
| 10 | |
| 11 | -- a/a.go -- |
| 12 | package a |
| 13 | |
| 14 | func A(err error) string { //@ loc(A, "A"), outgoingcalls(A) |
| 15 | return err.Error() |
| 16 | } |