8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
type S struct { Field *int } func f1() *S { s := &S{} s.Field = nil return s } func f2() { s := &S{Field: new(int)} return s } func test() { s1 := f1() print(*s1.Field) // report error here s2 := f2() print(*s2.Field) // safe }