Remove the implicit out variable

This commit is contained in:
Nigel Tao committed 2018-07-29 10:10:58 +10:00
1 parent 9919d78245
commit 58ded30954
4 files changed
+3 -14

No files matched your search

-8
View File
@@ -547,16 +547,8 @@ func (c *Checker) checkFuncSignature(node *a.Node) error {
inTyp.AsNode().SetMBounds(a.Bounds{zero, zero})
inTyp.AsNode().SetMType(typeExprTypeExpr)
outTyp := n.Out()
if outTyp == nil {
outTyp = typeExprEmptyStruct
}
localVars := typeMap{
t.IDIn: inTyp,
// TODO: drop the implicit "out" variable (and exprOut in this
// package)?
t.IDOut: outTyp,
}
if qqid[1] != 0 {
if _, ok := c.structs[t.QID{qqid[0], qqid[1]}]; !ok {