``` import core.stdc.stdio : printf; alias Void = byte[0]; static immutable byte[0] VOID = []; Void print() { printf("This should print"); return VOID; } Void identity(Void value) { return value; } void main() { identity(print()); } ``` Running this program should print "This should print", but instead nothing happens. The program works if `identity(print())` is replaced with just `print()`.
This is DMD specific, LDC behaves fine.
@WalterBright created dlang/dmd pull request #11668 "fix Issue 19846 - zero size function parameter such as byte[0] causes…" fixing this issue: - fix Issue 19846 - zero size function parameter such as byte[0] causes code to not be executed https://github.com/dlang/dmd/pull/11668
dlang/dmd pull request #11668 "fix Issue 19846 - zero size function parameter such as byte[0] causes…" was merged into master: - 4d196e962efa62a2dd8788a04e47a41f99ca9de5 by Walter Bright: fix Issue 19846 - zero size function parameter such as byte[0] causes code to not be executed https://github.com/dlang/dmd/pull/11668