Closed
Description
Describe the bug
Revive reports receiver name error at first and only declaration.
To Reproduce
Run revive
on this code:
package example
type Foo[T any] struct{}
func (f *Foo[T]) Foo() {}
type Bar[T comparable] struct{}
func (b *Bar[T]) Bar() {}
$ revive --version && revive
version 1.1.4
example.go:9:1: receiver name b should be consistent with previous receiver name f for invalid-type
example.go:3:6: exported type Foo should have comment or be unexported
example.go:7:6: exported type Bar should have comment or be unexported
Expected behavior
- I expected to not see any errors regarding receiver types.
- The receiver error should not report "invalid-type".
Desktop (please complete the following information):
- OS: Arch Linux
- go version go1.18 linux/amd64