Open sonalmahajan15 opened 5 months ago
Below is a case of false negative when using non-literals. Replacing return x with return nil, works as expected
return x
return nil
func fooReturn(x *int) *int { if x == nil { return x } return new(int) } func barReturn1(n int) { b1 := fooReturn(nil) print(*b1) // Expected: ERROR! }
Below is a case of false negative when using non-literals. Replacing
return x
withreturn nil
, works as expected