fixes for compiling function calls that return non-error nil ValPtr's

This commit is contained in:
Vern Paxson 2023-07-13 13:06:42 -07:00
parent b6bff8aa37
commit 5480dc8869
2 changed files with 7 additions and 1 deletions

View file

@ -351,7 +351,7 @@ string CPPCompile::GenCallExpr(const CallExpr* c, GenType gt, bool top_level)
if ( is_async )
invoke_func = "when_invoke__CPP";
else if ( t->Tag() == TYPE_VOID )
else if ( top_level || t->Tag() == TYPE_VOID )
{
ASSERT(top_level);
invoke_func = "invoke_void__CPP";