Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add support for rich effect functions via function pointers #277

Open
sonalmahajan15 opened this issue Sep 4, 2024 · 0 comments
Open

Add support for rich effect functions via function pointers #277

sonalmahajan15 opened this issue Sep 4, 2024 · 0 comments
Labels
false positive Requires more analysis and support good first issue Good for newcomers

Comments

@sonalmahajan15
Copy link
Contributor

NilAway currently does not recognize function pointers as valid rich check effect functions, thereby reporting false positives.

type S struct {
	f func() (*int, error)
}

func testme(s *S) {
	v, err := s.f()
	if err != nil {
		return
	}
	_ = *v // FP: unassigned variable `v` dereferenced
}
@sonalmahajan15 sonalmahajan15 added good first issue Good for newcomers false positive Requires more analysis and support labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false positive Requires more analysis and support good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant