This test verifies that we find implementations of the built-in error interface.

-- go.mod --
module example.com
go 1.18

-- p.go --
package p

type errA struct{ error } //@loc(errA, "errA")
var _ error = errA{} // pacify ptrtoerror analyzer

type errB struct{} //@loc(errB, "errB")
func (errB) Error() string{ return "" } //@loc(errBError, "Error")
var _ error = errB{} // pacify ptrtoerror analyzer

type notAnError struct{}
func (notAnError) Error() int { return 0 }

func _() {
	var _ error //@implementation("error", errA, errB)
	var a errA
	_ = a.Error //@implementation("Error", errBError)
}
