You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Potential nil panic detected. Observed nil flow from source to dereference point:
- nilaway/main.go:18:10: literal `nil` returned from `test()` in position 0 when the error return in position 1 is not guaranteed to be non-nil through all paths
- nilaway/main.go:29:7: result 0 of `test()` dereferenced via the assignment(s):
- `test()` to `b` at nilaway/main.go:25:2
The text was updated successfully, but these errors were encountered:
Hmm, we had added context sensitivity via contract support to track such error propagation and not report a false positive. Perhaps some corner case that we missed. @yuxincs, can you take a look?
A minimal example:
The wrap function returns nil if the error passed to it is nil.
The test function will only call wrap and pass err if err is not nil.
nilaway reports a potential nil panic:
The text was updated successfully, but these errors were encountered: