Allow empty-but-suspendible methods

This commit is contained in:
Nigel Tao committed 2018-03-28 10:24:40 +11:00
1 parent 9cc6964c30
commit f7dfe8c4c2
5 files changed
+20

No files matched your search

+1
View File
@@ -293,6 +293,7 @@ func (g *gen) writeFuncImplBodySuspend(b *buffer) error {
func (g *gen) writeFuncImplFooter(b *buffer) error {
if g.currFunk.suspendible {
b.writes("goto exit;\n") // Avoid the "unused label" warning.
b.writes("exit:")
for _, o := range g.currFunk.astFunc.In().Fields() {