lang: refactor anticipating io_forget_history

This commit is contained in:
Nigel Tao committed 2024-02-09 14:55:35 +11:00
1 parent c21cc95713
commit e8af2d0635
5 files changed
+60 -44

No files matched your search

+4 -2
View File
@@ -265,8 +265,10 @@ func (q *checker) bcheckStatement(n *a.Node) error {
if _, err := q.bcheckExpr(n.IO(), 0); err != nil {
return err
}
if _, err := q.bcheckExpr(n.Arg1(), 0); err != nil {
return err
if arg1 := n.Arg1(); arg1 != nil {
if _, err := q.bcheckExpr(arg1, 0); err != nil {
return err
}
}
if histPos := n.HistoryPosition(); histPos != nil {
if _, err := q.bcheckExpr(histPos, 0); err != nil {