| 1 |
Test of inlining a function that references err.Error, |
| 2 |
which is often a special case because it has no position. |
| 3 |
|
| 4 |
-- go.mod -- |
| 5 |
module testdata |
| 6 |
go 1.12 |
| 7 |
|
| 8 |
-- a/a.go -- |
| 9 |
package a |
| 10 |
|
| 11 |
import "io" |
| 12 |
|
| 13 |
var _ = getError(io.EOF) //@ inline(re"getError", getError) |
| 14 |
|
| 15 |
func getError(err error) string { return err.Error() } |
| 16 |
|
| 17 |
-- getError -- |
| 18 |
package a |
| 19 |
|
| 20 |
import "io" |
| 21 |
|
| 22 |
var _ = io.EOF.Error() //@ inline(re"getError", getError) |
| 23 |
|
| 24 |
func getError(err error) string { return err.Error() } |