Make SubExprHasEffect an ast.Flags not ast.Effect

This commit is contained in:
Nigel Tao committed 2018-12-16 11:09:23 +11:00
1 parent dd28f3c0f9
commit eb0cbd802a
2 files changed
+26 -28

No files matched your search

+1 -1
View File
@@ -987,7 +987,7 @@ func (p *parser) parseExpr() (*a.Expr, error) {
if err != nil {
return nil, err
}
if e.Effect().SubExprHasEffect() {
if e.SubExprHasEffect() {
return nil, fmt.Errorf(`parse: expression %q has an effect-ful sub-expression at %s:%d`,
e.Str(p.tm), p.filename, p.line())
}