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

Issue found by new nilness vet check #2757

Closed
dgryski opened this issue Nov 16, 2018 · 3 comments
Closed

Issue found by new nilness vet check #2757

dgryski opened this issue Nov 16, 2018 · 3 comments
Assignees
Labels
kind/bug Something is broken.

Comments

@dgryski
Copy link

dgryski commented Nov 16, 2018

Playing with the new vet, I found the following issue:

$ vet ./...
/Users/dgryski/go/src/github.com/dgraph-io/dgraph/query/query.go:544:16: impossible condition: nil != nil

The line is https://github.com/dgraph-io/dgraph/blob/master/query/query.go#L544 , and facetsNode has not been assigned a value between declaration on line 384 and the if test, so it's always nil.

@srfrog
Copy link
Contributor

srfrog commented Nov 16, 2018

Hi, which new vet is this? We use the vet tool that comes with Go.

@dgryski
Copy link
Author

dgryski commented Nov 16, 2018

It was just merged into master.

https://go-review.googlesource.com/c/go/+/149609/

@manishrjain
Copy link
Contributor

Thanks for catching this, @dgryski ! Seems like a bug at our end.

@manishrjain manishrjain added the kind/bug Something is broken. label Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

No branches or pull requests

3 participants