diff options
author | Teddy Wing | 2023-05-20 21:31:05 +0200 |
---|---|---|
committer | Teddy Wing | 2023-05-20 21:31:05 +0200 |
commit | 3f4e4cf94596eaae380385d81f9a629fbee0eb7d (patch) | |
tree | 3b2bb755878c4cddd08aeeb89e6111457831140f /testdata/declared_errors.go | |
parent | 856f21083e814176f9584cdb3d5df4cfdffc4834 (diff) | |
download | godefererr-3f4e4cf94596eaae380385d81f9a629fbee0eb7d.tar.bz2 |
Report when error declaration in signature is needed
While looking at the assignments in the `defer`, if we encounter an
`error`-type assignment, emit a diagnostic if the error named in the lhs
of the assignment is not present in the return signature's names.
Not sure if this makes sense to me yet. I probably only want to report a
problem for a non-declare assignment of an error value when the error
type in the return signature is _not_ named at all.
Diffstat (limited to 'testdata/declared_errors.go')
0 files changed, 0 insertions, 0 deletions