sh icon indicating copy to clipboard operation
sh copied to clipboard

syntax: document which nil-able fields cannot be nil

Open mvdan opened this issue 5 years ago • 1 comments

For example, ParamExp has a Name field of type *Lit, but it can never be nil. The reason it's a pointer is for consistency with all the other literal fields.

mvdan avatar Mar 27 '19 13:03 mvdan

There also seem to be fields that can be nil even though they don't look like it. For example, this code checks Stmt.Cmd for nil, which I (with no experience in Go) would've guessed can't be nil. It would be amazing to have all of that clearly documented :)

Syndace avatar Jun 06 '22 16:06 Syndace