go/parser: ParseExprFrom and ParseExpr might return ast.Expr(nil) when AllErrors is unset #70731
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
ParseExprFrom
is documented as such:go/src/go/parser/interface.go
Lines 193 to 198 in c8fb6ae
From the docs it is clear that, if reading the source succeeds, then the returned Expr shoudn't be nil, but it is not actually true (in case of a bailout, also see #70725).
Reproducer:
Same with
ParseExpr
:go/src/go/parser/interface.go
Lines 243 to 248 in c8fb6ae
Per docs it should not return a nil
ast.Expr
.CC @griesemer @alandonovan
The text was updated successfully, but these errors were encountered: