[Issue 22419] Allow return type inference for main

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 19 09:33:22 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22419

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #13195 "Fix 22419 - Allow inferred return type for main"
was merged into master:

- 8db36eadfcd72a30e4968f1d068f423cc96c190d by MoonlightSentinel:
  Fix 22419 - Allow inferred return type for main

  `auto main()` is fine iff return type inference resolves `auto` to one
  of the allowed return types (`void`, `int`, `noreturn`). Deferring the
  check after the return type inference removes this arbitrary limitation
  and allows for more flexible code.

  E.g. to use the upcoming `noreturn` inference and the associated
  codegen improvements.

https://github.com/dlang/dmd/pull/13195

--


More information about the Digitalmars-d-bugs mailing list