We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e240b52 commit 233064aCopy full SHA for 233064a
1 file changed
src/statement.c
@@ -824,11 +824,13 @@ Statement *ExpStatement::semantic(Scope *sc)
824
}
825
826
#endif
827
+ bool isCall = exp->op == TOKcall;
828
829
exp = exp->semantic(sc);
830
exp = exp->addDtorHook(sc);
831
exp = resolveProperties(sc, exp);
- discardValue(exp);
832
+ if (!isCall)
833
+ discardValue(exp);
834
exp = exp->optimize(0);
835
exp = checkGC(sc, exp);
836
if (exp->op == TOKerror)
0 commit comments