Make the return value mandatory; add ok

This commit is contained in:
Nigel Tao committed 2018-11-24 15:09:28 +11:00
1 parent 24ace1c144
commit 762b320b5e
11 files changed
+45 -50

No files matched your search

+1 -1
View File
@@ -596,7 +596,7 @@ func NewIf(condition *Expr, bodyIfTrue []*Node, bodyIfFalse []*Node, elseIf *If)
// Ret is "return LHS" or "yield LHS":
// - ID0: <IDReturn|IDYield>
// - LHS: <nil|Expr>
// - LHS: <Expr>
type Ret Node
func (n *Ret) AsNode() *Node { return (*Node)(n) }