Check that every dispensed temp var is used.

This commit is contained in:
Nigel Tao committed 2017-06-16 14:38:55 +10:00
1 parent ce2720fca1
commit f6501ec2d9
1 file changed
+3
+3
View File
@@ -624,6 +624,9 @@ func (g *gen) writeFuncImpl(n *a.Func) error {
}
g.writes("}\n\n")
if g.perFunc.tempW != g.perFunc.tempR {
return fmt.Errorf("internal error: temporary variable count out of sync")
}
return nil
}