Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generic struct is ignored #39

Closed
maratori opened this issue Feb 22, 2023 · 0 comments · Fixed by #41
Closed

Generic struct is ignored #39

maratori opened this issue Feb 22, 2023 · 0 comments · Fixed by #41

Comments

@maratori
Copy link

If struct has type parameters (aka generics), the linter doesn't find uninitialized fields.

type MyStruct[T any] struct {
	A T
	B string
}

var x = MyStruct[int]{
	A: 10,
	// linter doesn't catch missing B
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant