mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Add a nothing built-in literal
This commit is contained in:
1 parent
49627b46f2
commit
d1f1340d47
4 files changed
+12
-5
No files matched your search
@@ -446,7 +446,7 @@ func (g *gen) writeStatementRet(b *buffer, n *a.Ret, depth uint32) error {
|
||||
|
||||
b.writes("return ")
|
||||
if g.currFunk.astFunc.Out() == nil {
|
||||
return fmt.Errorf("TODO: allow empty return type (when not suspendible)")
|
||||
b.writes("((wuffs_base__empty_struct){})")
|
||||
} else if err := g.writeExpr(b, retExpr, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user