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
NilAway currently does not track the side effects of validator functions:
//nilable(a)funcvalidate(a*int) bool {
returna!=nil
}
//nilable(a)funcfoo(a*int) {
ifvalidate(a) {
// `a` should be nonnil now.print(*a)
}
}
But NilAway complains
unexpected diagnostic: Potential nil panic detected. Observed nil flow from source to dereference point:
- foo.go:31:10: function parameter `a` dereferenced
It could also be the case that the validate function validates certain fields of a struct and returns a boolean variable. Tracking this kind of side effects could be expensive, and we should think of a smart way to handle this in an efficient manner.
The text was updated successfully, but these errors were encountered:
NilAway currently does not track the side effects of validator functions:
But NilAway complains
It could also be the case that the validate function validates certain fields of a struct and returns a boolean variable. Tracking this kind of side effects could be expensive, and we should think of a smart way to handle this in an efficient manner.
The text was updated successfully, but these errors were encountered: