From c403f06b25af47de5ac94d089609b33309c57684 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 28 Dec 2017 14:27:02 +1100 Subject: [PATCH] Fix ast.Expr.Str for impure calls --- lang/ast/string.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/ast/string.go b/lang/ast/string.go index db77dec5..3776c8da 100644 --- a/lang/ast/string.go +++ b/lang/ast/string.go @@ -50,6 +50,8 @@ func (n *Expr) appendStr(buf []byte, tm *t.Map, parenthesize bool, depth uint32) buf = n.lhs.Expr().appendStr(buf, tm, true, depth) if n.flags&FlagsSuspendible != 0 { buf = append(buf, '?') + } else if n.flags&FlagsImpure != 0 { + buf = append(buf, '!') } buf = append(buf, '(') for i, o := range n.list0 {