digitalmars.D.bugs - [Issue 22419] New: Allow return type inference for main
- d-bugmail puremagic.com (19/19) Oct 18 2021 https://issues.dlang.org/show_bug.cgi?id=22419
https://issues.dlang.org/show_bug.cgi?id=22419 Issue ID: 22419 Summary: Allow return type inference for main Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: moonlightsentinel disroot.org `auto main()` is currently rejected by the compiler even if the right return type (int/void/noreturn) can be inferred from the function body. But return type inference allows for more flexibility and potentially better codegen for `void` vs. `noreturn`. --
Oct 18 2021