Skip to content

Commit

Permalink
[stable] [changelog] Add item for noreturn main
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrel authored and dlang-bot committed Feb 18, 2022
1 parent b051cc6 commit a3865eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions changelog/main_return_type.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
`main` can now return type `noreturn` and supports return inference

If `main` never returns (due to an infinite loop or always throwing an
exception), it can now be declared as returning `noreturn`.
See https://dlang.org/spec/type.html#noreturn.

If `main` is declared with `auto`, the inferred return type must be
one of `void`, `int` and `noreturn`.

0 comments on commit a3865eb

Please sign in to comment.