Have cgen look for !?? methods not ? methods

This commit is contained in:
Nigel Tao committed 2018-07-29 14:01:57 +10:00
1 parent 2100a9f837
commit 5cca9471ec
4 files changed
+10 -19

No files matched your search

+1 -2
View File
@@ -30,8 +30,7 @@ func (g *gen) writeExpr(b *buffer, n *a.Expr, rp replacementPolicy, depth uint32
}
depth++
// XXX: s/Optional/Coroutine/
if rp == replaceCallSuspendibles && n.Effect().RootCause() && n.Effect().Optional() {
if rp == replaceCallSuspendibles && n.Effect().RootCause() && n.Effect().Coroutine() {
if g.currFunk.tempR >= g.currFunk.tempW {
return fmt.Errorf("internal error: temporary variable count out of sync")
}